Design and Dynamic Locomotion Control of Quadruped Robot with Perception-Less Terrain Adaptation

In this paper, a parallel quadrupedal robot was designed that is capable of versatile dynamic locomotion and perception-less terrain adaptation. Firstly, a quadrupedal robot with a symmetric legs and a powerful actuator was implemented for highly dynamic movement. Then, a fast and reliable method based on generalized least square was proposed for estimating the terrain parameters by fusing the body, leg, and contact information. On the basis of virtual model control (VMC) with the quadratic program (QP) method, the optimal foot force for terrain adaptation was achieved. Finally, the results obtained by simulation and indoor and outdoor experiments demonstrate that the robot can achieve a robust and versatile dynamic locomotion on uneven terrain, and the rejection of disturbances is reliable, which proves the effectiveness and robustness of this proposed method.


Introduction
Legged animals, such as cats, can perform versatile movements on diverse terrain, owing to their structure and cooperative motion. Imparting this ability to an artificial robot is an enormous challenge in the field of robotics. The design of legged robots has benefited from the observation of animal structure. Quadruped robots have the natural advantages of trafficability and agility on complex outdoor terrain compared with wheeled robots [1]. In recent years, many advanced quadruped robots have been achieved in terms of dynamic motion and stability, such as BigDog [2], StarIETH [3], HyQ [4], ANYmal [5], MIT Cheetah [6][7][8], Jueying [9], BQR [10], and Minitaur [11]. To realize the more practical tasks of quadruped robots, such as material transportation and rescue in complex environments, it is important to investigate the leg structure and locomotion stability on uneven terrain.
Dynamic locomotion is preliminarily determined by the ground reaction force (GRF), which can be characterized by the leg structure and actuators. Generally, series [6] and parallel [12,13] are the main two leg topologies, and series articulated robots have a big leg motion range. However, one of the joints may be subjected to a heavy load or need more higher joint velocity for fast dynamic movement. The parallel leg is advantageous for force production but may waste energy when the leg swings back and forth. Torque density may be a significant metric for actuators design for dynamic robot. Hydraulic actuation can provide a powerful GRF, but it is not ideal for use in everyday situations. Recently, an electric actuation method combining a hightorque density electromagnetic actuator and low-ratio gear was proposed and can effectively balance the requirements for transparent transmission and high-torque generation. Inspired by this, a high-torque density actuator was designed and assembled using a custom motor and two-stage planetary gearbox.
To improve the trafficability on uneven terrain, accurate terrain estimation and robot adaptation are necessary. The walking surface modeling method has been proposed to approximate the local slope for each walking position with the absence of vision [14], and the least squares problem has been solved using the pseudoinverse. The slope angle was calculated by considering the weighted average of the inertial measurement unit (IMU) information, and the support plane was calculated using least squares estimation [15]. The previously proposed locomotion adaptation method [16] consists of the adaption of control frame, trunk orientation, stance legs, and swing leg motion. The spatial positions of three feet were selected to fit the support plane based on the vertical relationship between in-plane vector and normal vector [17]. Additionally, some studies have used the straight slope between the front and back footholds to approximate the inclination of the support plane directly [18]. These two methods are convenient to calculate, but the solution accuracy is poor.
To enhance the dynamic motion ability and controllability of quadruped robot, this study implemented parallel leg structures with symmetrical rods which match with the low reduction ratio planetary reducer to improve the backdrivability. Then, aiming at traffic capacity in uneven terrain, the locomotion control framework based on VMC [19] was established and mainly includes GRFs optimal allocation based on the QP method and a full terrain adaptation method without perception. The proposed terrain adaptation method uses the generalized least square method to estimate the space supporting plane only by fusing the trunk orientation and joint encoder information without additional perceptual or visual support and then adapts the support plane to achieve the balance of the robot through the adaption of body state and swing leg movement. The proposed method achieves better versatility, reliability, and accuracy results. In addition, it was validated through simulation and various experiments on the prototype of our BQR-2 quadruped robot.
The rest of this paper is organized as follows. The leg topology and actuator design are introduced in Section 2. The modeling and control framework are presented in Section 3. Section 4 presents the estimating of supporting plane and online adaption. The simulation and experimental results are discussed in Section 5. The conclusions drawn from this study and directions of future work are discussed in Section 6.

Robot Design with Symmetric Leg
Force production plays a crucial role in legged robot dynamic locomotion due to repeated impact and continuous high force interaction with ground. In this study, we mainly focused on three leg topology and actuator designs because the force production is closely related with leg Jacobian. This was compared within the leg topology of series [6], parallel [12], and symmetric [20], as shown in Figure 1. Only the flexion motion of hip (θ 1 ) and knee (θ 2 ) joint are presented in this paper, L 1 and L 2 are the length of thigh and shank leg. L 1 is equal to L 2 in the condition of series and parallel leg, and L 2 is double of L 1 in the condition of symmetric leg according to parameter from above-mentioned robot. Figure 2 shows the relationship of GRF and maximal joint torque. The data comes from a numerical simulation with MATLAB; in this case, a constant GRF was inputted every time in stance phase; then a set of joint torque can be got by τ = J T i f , and we selected the maximum value to compare.
J T i are the Jacobian of three legs. With the increasing of GRF, the other group of joint torque data can be collected. Obviously, for the series leg, the hip joint torque is zero, and the knee joint torque is equal to the double joint torque of the symmetric leg. The two joint torques of the symmetric leg are equal and are small. Generally, in terms of leg topology, the symmetric leg requires a small torque source, which means that it can produce larger GRF with the same actuator. Additionally, actuator torque density is a metric we focused. Hence, a custom high torque motor with a twostage planetary reducer was designed to improving torque density. As shown in Figure 3, the first-stage sun gear linked with the motor shaft; both the first-stage and second-stage planet carriers are connected with the part of ring gear. Obviously, most part of the two-stage planetary reducer is within the motor to ensure a small size. Furthermore, the reduction ratio of 17.4 was selected considering the tradeoff between torque density and leg transparency.
Finally, a BQR-2 robot, as shown in Figure 3, is designed with a characteristic of large force production. To estimate the state of robot, a high precision encoder (EBI 1135) was equipped with the motor, a six-axis inertial measurement unit (IMU-MTi100) was mounted at the center of trunk, and the three-dimensional force sensor was located under each foot to measure the GRF. In this robot, NUC was the upper computer and the Elmo Motor Driver was the lower controller, and the control period is 1 kHz over EtherCAT. The robot mass is about 40 kg, and the leg length is 0.6 m. To improving the locomotion performance, the main mass is located in the robot body base, and the lower leg was built with a carbon. As shown in Figure 3, the controller, driver, and battery were all located in the center of this robot.

Locomotion Control with Optimization of GRF
This section introduces the proposed locomotion control framework, which includes a motion planner, VMC with QP optimization, a state and ground estimator, and a lowlevel controller, as shown in Figure 4. The control target is to adjust the position and orientation of robot base according to the robot state, which can be achieved by regulating the GRFs through QP optimization at the standing phase. The constraints imposed by the friction cone and joint motor were considered in the QP optimization. Finally, the optimal solution was mapped into the joint torques by  Figure 1: The three kinds of leg topology recruitment. 2 Cyborg and Bionic Systems Jacobian. During this process, a fast method for estimating the full terrain information is proposed to balance the robot posture.
3.1. Dynamic Model. Figure 5 illustrates the coordinate of robot systems. Here, fO n − x n y n z n g and fO b − x b y b z b g represent the world and body coordinates, respectively; ψ, θ, ϕ     3 Cyborg and Bionic Systems are the roll, pitch, and yaw angle; and R is the rotation matrix of the body frame expressed in the inertial frame.
For highly dynamic locomotion, the lower leg rod was designed with carbon to reduce the leg mass and inertial, and the actuator is located near the base. So the most mass is concentrated in the robot body, and for simplicity, in this paper, the robot leg can be as massless. It is assumed that GRF is the only external force acting on the feet, and the robot pitch and roll velocity are small. Then, the GRFs can be formulated as a function of the linear acceleration and the angular acceleration of the body base. The dynamic model can be expressed as follows: where m and I g are the robot mass and inertia; g is the gravity; r i × ∈ℝ 3×3 is the relative position matrix of the i th leg; and _ ω, € x d com ∈ ℝ 3 are the desired angular acceleration of the robot's base and the acceleration of CoM.
In the proposed control framework, the gait can be defined by a finite state machine, which is time-and eventbased. The control objectives are the desired trajectories of the CoM position, orientation of trunk, and swing feet trajectories. To reduce the impact disturbance, the cubic spline interpolation method can be used to plan the foot locomotion to achieve a smooth trajectory.

Motion Control.
To achieve robust and efficiency locomotion, the VMC was adopted as a control strategy based on the current and target state.
where F c,d and τ b,d are the virtual force and torque acting on CoM; K p,p , K p,w and K d,p , K d,w represent virtual proportional gain and derivative gain, respectively; p c,d and _ p c,d are the desired position and velocity, respectively; p c and _ p c are the actual position and velocity, respectively; q b,d and w b,d are the desired trunk angle and angular velocity, respectively; and q and w are the actual trunk angle and angular velocity, respectively.
Combined with Equations (2) and (3), the solution of the GRF can be transformed as an optimization problem, as where S, W ∈ ℝ 6×6 are the weight matrices, α ∈ ℝ is the secondary objective, and μ is the friction coefficient. This problem can be solved by QP optimization, and this QP problem can be resolved by 0.15 ms. To improving motion tracking, some basic physical constraints, such as the friction cone and the unidirectionality of the leg output force in the z direction, should be satisfied. The constraints of ith GRFs are given as As shown in Figure 4, the command torque in stance leg τ f can be mapping by leg Jacobian from GRFs based on Equation (4), and the feedback τ b can be obtained through the joint PD as the swing phase command.

Adaptation Locomotion on Slope Terrain
For legged robots, adaptive control is an important requirement of adaptive locomotion performance in complex terrain. The most important adaptive control components are the estimation of the unknown terrain environment and the corresponding online adjustment strategy.

Estimation of Supporting Plane.
In the accuracy of state estimation during the robot's walking movement, a method for full terrain estimation based on the generalized least squares method is proposed to calculate the space supporting plane. In this method, the foot positions in the world coordinates are obtained by fusing the trunk orientation information from the IMU and the joint encoder  Cyborg and Bionic Systems information without additional perception. The walking surface can be modeled as a space plane [8,16], as follows: Ax + By + Cz + 1 = 0. The terrain estimated was a virtual plane decided by foot contact point; therefore, the robot can negotiate a terrain with moderate dents and bumps. The distance from each foot point to the target plane P i ðx i , y i , z i Þ T can be solved by constructing the minimum problem of the sum of squares of the distances to obtain the optimal support plane, as follows: where d i = nP i + 1 is the distance from the ith foot to the desired plane and n = ðA ; B ; CÞ is the normal vector of walking surface plane. The generalized least squares problem is actually a minimization problem, and the solution objective is to determine a set of optimal coefficients by minimizing the error between measured value and the model value. This problem can be solved by finding the poles of the error function, as expressed by Equation (7). Then, the inclination angles of the foot support plane can be calculated according to the relationship between the normal vector and the reference plane, which is the basis of the subsequent adaptive control.

Online Adaption in Slope
Terrain. To achieve stable locomotion, it is necessary to adjust the robot's posture online according to the estimated terrain information. This subsection introduces the control strategy for the robot system's adaptation to uneven terrain. Here, pitch direction attitude adjustment is considered an example, and the roll direction is the same. On flat terrain, the desired equilibrium state of the robot is as follows: the Z axis of the body base is aligned with gravity, the X axis is perpendicular to gravity, and constant body height is maintained. On a slope, however, the body base should adapt according to the slope to achieve a new balanced state. As shown in Figure 6, the proposed adaptive method mainly includes the adjustment of the trunk orientation and the adaptation of the swing leg trajectory.
As shown in Figure 6, to maintain a balance when the robot is on the slope, the balance posture on the horizontal plane should be rotated to obtain the posture shown in the gray model. This process only realizes the adjustment of the trunk direction. According to the stability criterion, the net force and moment acting on the robot must be zero. Additionally, the supporting leg (virtual dotted line with the same color) must be adjusted to the position parallel to the gravity direction due to the gravity disturbance in this state. Additionally, this adjustment makes the CoM position move the offset Δx com in the upward direction of slope, and the leg length correspondingly increases. To ensure the adjustable range of the legs in unknown future motion, the CoM position should be adjusted along the gravity direction. Through simplification, it is concluded that, on the slope with θ p , the adjustment in the upward direction and vertical direction of the slope can be calculated as where h com and h a,com are the body height on the flat ground and the adaptive height on the slope. When walking on the slope, it is necessary to adjust the swing foot trajectory in an appropriate manner. As shown in Figure 6, the planned foot trajectory on flat ground was first rotated toward the slope (from the green dotted line to the gray dotted line). However, the trunk position relative to the foot adapted to the slope and the previous foot planning did not match the current state, which led to unsatisfactory movement. To achieve matching in real time, the motion trajectory of the swing leg was adjusted based on the corresponding CoM position, and the highest point of the swing leg was calculated as follows: where h sf is the highest point of swing leg on the flat, h a,sf is the adaptive highest point on the slope ground, and Δx sf is the compensation offset of the swing leg in forward direction. In the flight process, the target position of the foot is calculated by cubic spline interpolation, which can achieve both a starting and ending velocity acceleration equal to zero and ensure more stable movement.

Simulation.
This section discusses the simulations of robot's locomotion on uneven terrain with the proposed method. In this study, the V-REP dynamic software and MATLAB were used to conduct simulations. To verify the proposed terrain estimation method and the corresponding adaptive motion strategy for the quadruped robot, a path starting from the flat ground and then gradually moving to the slope with trot gait was set. In this process, the space plane occupied by the robot's feet is constantly changing. Figure 7 shows the snapshots of simulation.    Figure 8 shows the result of simulation, walking on the flat ground occurred from 0 s to 1.2 s, and the adjustment stage of gradual transition from the horizontal plane (0Â°) to the preset slope angle (22Â°) occurred from 1.2 s to 4.2 s. In this movement stage, the fore legs are on the rising slope, and the hind legs are on the flat ground. We can find that the angle of virtual slope based on the unknown estimation of foot tip increases linearly, which is consistent with  our uniform motion. The stage wherein the robot was completely on the 22Â°slope was from 4.2 s to 7.5 s. The partially enlarged view of the slope angle tracking during the stage of movement on the slope is shown in Figure 8. As can be seen, the slope angle error between the evaluation and preset fluctuated in the range of -0.08Â°to 0.03Â°, which confirms the accuracy of the proposed slope angle evaluation method. Moreover, the actual pitch angle is higher by approximately 0.2Â°compared with the target value. The reasons for this may be that the controller parameters are not ideal and that the offline CoM position estimation of the robot is not accurate. These issues will be improved in future work.

Experiments.
Indoor and outdoor experiments were conducted to validate the effectiveness of the proposed method. First, the up-slope experiments were conducted on a 22Â°slope setup indoor. Figure 9 shows the sequential snapshots captured on the up-slope with a trot gait. As shown in Figure 10, the position tracking is satisfactory, and only a small position error existed, owing to the IMU error. The estimation of the slope condition is ideal, and certain fluctuation existed because the slope parameter was estimated in the four-leg supporting phase. The blue line indicates the data obtained from the IMU after Kalman filtering and coincides with the slope parameter. There was a larger error of the robot pitch angle when the back leg located on the slope, because the step between slope and ground may result in a slide. The green line indicates the actual velocity data obtained from the IMU, the robot walked from a plat ground to the slope before 10 s, and the velocity had a larger fluctuation in this transfer process. Figure 11 shows the robot state and GRF of one leg. The vertical GRF fluctuates around the 200 N at stance phase; the period smooth curve presents the force at swing phase, which confirms that the robot state machine is stable and reliable. To keep a stable trot gait, there was a short fourleg supporting phase. Obviously, there is no slide on the   Cyborg and Bionic Systems slope because the GRF values of horizontal are small enough. Finally, to validate the robust locomotion of our quadruped robot, three outdoor experiments were performed with an arm functioning as disturbance. In this paper, the arm in these experiments was inactivated which can be as a mass model. Figures 12 and 13 show the sequential snapshots captured on the slope, grassland, and rock terrain, respectively. Figure 14 shows the result data of rock terrain; the estimated slope and robot pitch angle have a larger fluctuation compared with the flat slope condition. Also, there is a slide on this ground because the cobblestone is slippery, and the foot forces are fluctuant consequentially. Table 1 lists the main locomotion parameters of the robot in the outdoor experiment. The weights of the foot force distribution should be changed to adapt to different terrain.

Conclusions
Dynamic locomotion and adaptability to complex terrain are important indicators of quadruped robot performance. By the comparative analysis of different structures, this study designed a symmetrical parallel quadruped robot with the advantages of strong force production and excellent motion performance. Then, a control framework based on VMC was established to enhance the robot's ability of adapting to unknown complex terrain. This framework mainly involves the optimal allocation of GRFs based on QP and a complete terrain adaptation method. The proposed terrain adaptation method uses spatial support plane estimation based on the generalized least squares method and fuses the body orientation information and joint encoder information without  9 Cyborg and Bionic Systems additional perceptual or visual information to realize the balance control of the robot by adapting the trunk posture and swing leg trajectory, respectively. This method is robust to the drift of the robot attitude measurement, and the involved calculations are easy. The simulation and experimental results obtained for indoor and outdoor locomotion reveal that the robot has strong adaptive ability on uneven terrain and can resist certain external impact, which demonstrates the effectiveness and robustness of the proposed method. In a future work, we plan to improve the highly dynamic locomotion, such as running and jumping of the quadruped robot.

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

Conflicts of Interest
The authors declare that there is no conflict of interest.