Trotting Control of Load-Carrying Quadruped Walking Vehicle with Load Variations Based on the Centroidal Dynamics and Adaptive Sliding Mode Control

Aiming at the control problems for load variations of the load-carrying quadruped walking vehicle, the method combining centroidal dynamics and adaptive sliding mode control is proposed to ensure the weight adaptation and improve the tracking accuracy of forward speed and lateral speed. The motion control of the walking vehicle is divided into two parts: torso motion control and swinging legs motion control. The control methods of centroidal dynamics and task space PD are applied to the motion control of the torso, and the virtual model control method is applied to the motion control of swinging legs. Then, the adaptive sliding mode control algorithm is applied in the height direction of the vehicle to realize the adaptation to weight change and the weight identiﬁcation, and the tracking accuracy of forward speed and lateral speed is improved by combining the centroidal dynamics. Adams and Simulink are used to simulate the trotting gait on the ﬂat ground and slope when the weight of walking vehicle changes, and comparisons are made with the virtual model control method. The results show that the method combining centroidal dynamics and adaptive sliding mode control can realize the adaptability to load variations and reduce the forward speed and lateral speed tracking error, which proves the eﬀectiveness of the proposed control method.


Introduction
Legged locomotion enables humans and quadruped animals to walk on rough terrains with a certain amount of loads. Imitating the structure of large quadruped animals in nature, the load-carrying quadruped walking vehicles play an important role in the fields of transportation, disaster rescue, and resource exploration [1][2][3]. Affected by the loads, the weight of load-carrying quadruped walking vehicles changes greatly. Changes in the weight of the vehicle may cause walking problems, especially in the translational freedom of the torso. e walking vehicles can only achieve stable walking by adapting to the variations of the torso weight.
One of the most common control methods for walking vehicle trotting gait is the SLIP (Spring Load Inverted Pendulum) method. e well-known load-carrying quadruped walking vehicles BigDog [4] and LS3 [5] probably adopted the SLIP control algorithm [6]. Hutter et al. [7], Karssen et al. [8], and Chen et al. [9] used this method to the trotting or galloping control of quadruped walking vehicles. Based on the SLIP method, Ringrose [10] proposed a method of adjusting parameters offline through multiple simulations to accommodate changes in vehicle weight. But, in the SLIP control method, speed control is realized by choice of foot placement in flight phase, so the speed cannot be controlled accurately.
In addition to the SLIP control algorithm, the VMC method is another intuitive control method. Pratt put forward the virtual model control (VMC) method and realized the control of walking vehicle by virtual components [11]. Winkler et al. [12], Xie et al. [13], Chen et al. [14], and others applied the VMC control method to the trotting control of quadruped walking vehicles. To adapt to the load variations of biped walking vehicles, Chew et al. [15,16] applied the adaptive sliding mode control method to the height control of the vehicle. Hu et al. [17] applied the adaptive sliding mode control to the control of planar biped walking vehicles to enhance the robustness of the vehicle. e VMC method can realize the decoupling of the vehicle motion in all directions in control. e methods proposed by Chew and Hu have great reference value. But they did not consider the problems of speed tracking when the weight changes and the characteristics of the dynamic system are not fully utilized. Although the vehicle motion is only in the plane, there are too many parameters that need to be adjusted. Stable walking in 3d environment of quadruped walking vehicles is a new problem to be solved. e problem of walking vehicles adapting to the load variations can be regarded as the problems of resisting the unknown interference or dealing with the inaccuracy of dynamic parameters. In [18,19], adaptive neural network controllers were designed to compensate for interference in the model or environment. Bououden combined computed torque control with fuzzy logic control to improve the trajectory tracking accuracy [20]. Heijmink et al. applied the PI 2 learning method to the control parameters adjustments of quadruped walking vehicles [21]. But these control methods require more computation and the choice of parameters depends more on experience.
e control methods based on centroidal dynamics are the focus of the current research. Orin et al. [22] proposed the concept of centroidal dynamics and applied it to the walking control of biped walking vehicles. Focchi et al. [23] applied the centroidal dynamics control method to the static gait control of quadruped walking vehicles. Winkler et al. [24] applied the centroidal dynamics to the gait planning of ANYmal walking vehicle. Centroidal dynamics can separate the inertia in the control process. e combination of centroidal dynamics and adaptive sliding mode control can greatly reduce the calculation complexity.
Based on the kinematics and centroidal dynamics modeling of the walking vehicle, we combine centroidal dynamics with adaptive sliding mode control to achieve the expected height and speed tracking during the load variations. e effectiveness of the control method is verified by dynamic simulations.

Kinematic Modeling of the Load-Carrying
Quadruped Walking Vehicle e model of the load-carrying quadruped walking vehicle is shown in Figure 1(a) below, which includes a torso and four legs. Each leg consists of three active joints. ey are the hiplateral-swing joint, the hip-longitudinal-swing joint, and the knee joint from the top to bottom, and the corresponding leg segments are the lateral-swing segment, thigh, and shank, respectively. e barycentric coordinate system O b − x b y b z b is built in the centroid of the vehicle. e torso of walking vehicle is simplified to the geometry shown in Figure 1(a), and the load is simplified to the geometry shown in dotted lines in Figure 1(a).
A schematic diagram of the structure parameters of the walking vehicle is shown in Figure 1(b). e description of structure parameters and specific values are shown in Table 1 below. e walking vehicle is a multibody system with a floating base, so the six-dimensional vectors are used to calculate the motion vectors of the walking vehicle [25,26]. Assume that there is a virtual joint between the vehicle torso and the ground, with the ground being processor link and the torso being successor link for this joint. e links and joints are numbered starting from the ground (to distinguish the link from the joint, J is added before the joint number). en, the coordinate frame for each link of the walking vehicle is shown in Figure 2(b). e joint model proposed by Roberson and Schwertassek is used to obtain the speed and acceleration of each link [27]. e relationships of speed and acceleration between adjacent links are shown in the following formulas: where v i is the speed of link i, i X i−1 is the transformation matrix from link i-1 to link i, S i is the free mode matrix of joint i, _ q i is the angular speed of joint i, a i is the acceleration of link i, € q i is the angular acceleration of joint i, and � S i is the apparent derivative of S i .
Since the calculations of speed and acceleration of the links in each leg are similarly, the right-front leg is taken as an example, as shown in Table 2 below. e Jacobian matrix of each leg can be obtained by using the recursive relationship (1), as shown in the following equation:

Centroidal Dynamics Modeling of the Load-Carrying Quadruped Walking Vehicle
e parameters of centroidal dynamics can be calculated by using the vehicle joint-space dynamic equations [28]. e speed vector _ q of the load-carrying quadruped walking vehicle is expressed as follows: According to [29], the joint-space dynamic equations of walking vehicle can be expressed in the following equation: where H is the joint-space inertia matrix, C is the deviation force matrix, τ g is the gravity matrix, τ is the input force matrix, J is the Jacobian matrix, and f c is the force matrix between the legs and the ground. H, C, and τ g can be calculated by inverse dynamics and composite body algorithm in [30]. Since the vehicle's torso is floating, the forces across the virtual joint are 0. erefore, each vector in (5) can be divided into the torso part and the leg links part, as shown in the following equation: where the subscript 1 represents the torso and the subscript * represents all links except the torso. e joint-space dynamic equations of the torso can be obtained from (6), as shown in the following equation:    (a) Since the weight ratio of the vehicle torso (without load) to a single leg is 10 : 1, only the weight of the torso is considered. erefore, equation (7) is transformed into where C 1b is the deviation force matrix when only the torso motion is considered. When the leg motions are ignored, the centroidal dynamics of the walking vehicle are shown in the following formula: where _ h G is the change rate of centroidal momentum, A G1 is the centroidal momentum matrix, and _ A G1 is the derivative of A G1 when only the torso motion is considered. By mapping (8) to the barycentric coordinate system, we can get where 1 X T G is the transformation matrix from the barycentric coordinate frame to the torso coordinate frame. Both (9) and (10) are walking vehicle centroidal dynamics equations in the barycentric coordinate frame, so the vectors should be kept equal. erefore where U 1 is the joint selection matrix and U 1 � 1 6×6 0 6×12 .

Torso Motion Control of the Walking Vehicle.
According to (9), € q is needed in the calculations of resultant external forces on the vehicle. e motion of the vehicle needs to meet certain constraints and high-level instructions, so accelerations of the torso can be obtained by the task space PD control as follows: where α and β are the roll angle and pitch angle of the vehicle. _ α, _ β, and _ c are the roll angular speed, pitch angular speed, and yaw angular speed, respectively. z is the height of the walking vehicle. _ x, _ y, and _ z are the speed in each direction of the torso coordinate frame. e quantities with subscript d are the expected value of each variable and k are the corresponding gain coefficients. e external forces on the vehicle can be obtained by (9), (11), and (12), as shown in the following equations: e external forces are distributed to the supporting legs through (14). Due to the singularity of the distribution matrix of external forces, we adopt quadratic programming to solve the ground reaction forces [31,32]. e objective function of quadratic programming is shown in the following equations: are ground reaction forces of the vehicle's forward and rear legs, respectively. S and W are the external forces constraint matrix and the ground reaction forces constraint matrix, respectively. μ is the friction coefficient of the ground. In order to realize the real-time solution of the above programming, the software Gurobi is employed.
After obtaining the ground reaction forces, the joint torques of supporting legs can be solved by the following equations: where J fl and J hl are the Jacobian matrices of the vehicle's forward leg and rear leg.

Motion Control of the Swinging Legs.
By adding virtual spring-damping components between the actual positions and the expected positions of the feet, we achieve the control of swinging legs. e virtual components on one foot of swinging legs are shown in Figure 3, and the corresponding equations are shown in (17).
where f sx , f sy , and f sz are the forces on the foot of swinging leg and k is the corresponding gain coefficient. x sd , y sd , and z sd and _ x sd , _ y sd , and _ z sd are the expected values of the position and speed in each direction of the foot, and x s , y s , and z s and _ x s , _ y s , and _ z s are the actual values of position and speed.
After the foot forces of the swinging leg are obtained, the Jacobian matrix of the swinging leg is used to convert the foot forces into joint torques: where J s is the Jacobian matrix of the swinging leg. e foot trajectory of the swinging leg and state machine of trotting gait are the same as those in [33].

Adaptive Sliding Mode Control for the Height of Load-Carrying Quadruped Walking Vehicle
In order to ensure the height tracking accuracy in the process of load variations, we design an adaptive sliding mode controller based on the methods in [34].

Design of the Adaptive Sliding Mode Controller.
Since the research object is a multi-rigid-body system and its motion is determined by Newton's second law, the equation of the nonlinear system can be assumed to be where a 1 , a 2 , a 3 , and c are unknown constants and a 1 is not 0. f(x, _ x) and g(x) are known nonlinear functions. d is an unknown disturbance and u is control input. And In order to make x(t) accurately track the expected value x d (t), the sliding surface s � 0 can be defined as follows: where x is the tracking error and x � x − x d . λ is a constant and λ > 0. Differentiating (21) yields According to (22), the control input that makes _ s � 0 is where h i is the estimated value of a i /c. In order to meet the sliding condition and avoid the influence of interference, we add a discontinuous term for u; then where c − 1 is the estimated value of c − 1 . η is a constant and η > 0. In order to ensure the convergence of the boundary layer, the Lyapunov function V(t) is defined as follows: where c 1 , c 2 , and c 3 are constants. In order to avoid the drift due to interference when the system state reaches the boundary layer, the variable s Δ is introduced to describe the distance from the current state to the boundary layer.
where ϕ is the thickness of the boundary layer and sat(y) is the saturation function, satisfying According to (26), when the system state is outside the boundary layer, _ s Δ � _ s; when the system state is inside the boundary layer, _ s Δ � 0. Assuming that the system state is outside the boundary layer, the following equation can be obtained:  Figure 3: Virtual components on one foot.

Mathematical Problems in Engineering
en the time derivative of the Lyapunov function is converted into Assuming that ηϕ � D, (33) erefore, _ V(t) is seminegative definite, which ensures that the system trajectory finally converges to the boundary layer. According to (29-32), when the system state reaches the boundary layer, the adaptive law stops immediately, avoiding drift caused by common adaptive methods.

Height Control and Weight Identification of the Walking
Vehicle. According to the joint-space dynamic equations (6), the vehicle height direction is most sensitive to load variations. erefore, the adaptive sliding mode controller is applied to the height control and the weight identification of the walking vehicle, and then the identified weight is put into the centroidal dynamics equation.
According to centroidal dynamics, the dynamic equation in the height direction of the walking vehicle can be written as where F z is the vehicle's external force in the height direction, g is the acceleration of gravity, and d z is the interference term in the height direction. Assume that d z is limited by D z ; namely, |d z | ≤ D z . e sliding surface and error of height control are as follows: According to (19), (24), and (29), the control force F z in the height direction and the estimated weight _ m e of the vehicle are as follows: According to the above analysis, the load-carrying quadruped walking vehicle's control block diagram is shown in Figure 4 below.

Trotting Gait Simulations of the Load-Carrying Quadruped Walking Vehicle
In order to analyze the influence of parameters of adaptive sliding mode control and verify the effectiveness of the control algorithm, Simulink and Adams are used for the trotting gait simulations of the load-carrying quadruped walking vehicle.

Influences of the Parameters of the Adaptive Sliding Mode
Controller on Control Effect. According to (38) and (39), the main parameters of the adaptive sliding mode controller include λ, η, D, and c 1 . We analyze the control effects of parameters based on the vehicle trotting on flat terrain without load variations. In simulations, the expected height of the walking vehicle is 0.687 m, the gait period is 0.5 s, and the expected lateral speed and three attitude angles are 0. e expected forward speed increases first and then remains the same and finally decreases.

Effects of λ on Control.
While other parameters remain unchanged, the effects of λ on the adaptive sliding mode control are studied. Assuming that λ is varied among 3, 30, and 60, the values of η, D, and c 1 are 1500, 30, and 150, respectively. e actual height and estimated weight of the vehicle during trotting are recorded, as shown in Figure 5 below. According to Figure 5(a), as the value of λ increases, the height error of the walking vehicle decreases, and the time for the height to reach a stable value decreases. However, due to the difference between the initial height and the expected height at the initial moment, when the value of λ is large, the vehicle's height fluctuation is large. According to Figure 5(b), as λ increases, the fluctuation of the estimated weight becomes larger, and the time it takes for the estimated weight to reach stability becomes longer. erefore, the λ value cannot be too small to reduce the height error nor too large to reduce the response time of the estimated weight.

Effects of η on Control.
According to (34) and (38), η affects the boundary layer ϕ and the control force in height direction. erefore, the values of λ, D, and c 1 remain unchanged, which are 30, 30, and 150, respectively. Assuming that η is varied among 100, 500, 1500, and 5000, their effects are analyzed.
According to Figure 6(a), as η increases, the walking vehicle's height error gradually decreases, and the time for the vehicle height to reach a stable value decreases. According to Figure 6(b), as η increases, the time required for the estimated weight to reach stability decreases first and then increases, which indicates that too small or too large η will slow down the time required for estimated weight to reach stability.

Effects of D on Control.
Because ηϕ � D is assumed during the controller design, while other control parameters remain unchanged, the change in D will directly affect the    According to Figure 7(a), as D increases, the response time of the vehicle's height control decreases, but the control error increases. According to Figure 7(b), as D increases, the fluctuation of the estimated weight decreases at the initial time, and the time required for estimated weight to reach stability is also reduced. During the control of the walking vehicle, D is determined by external interference.

Effects of c 1 on Control.
According to (39), c 1 has a great effect on the estimated weight, so the values of λ, η, and D are 30, 1500, and 30, respectively. Assuming that c 1 is 5, 50, 150, and 500, the effects of c 1 on control are analyzed.
According to Figure 8(a), as c 1 increases, the walking vehicle's height error gradually decreases, but the height fluctuation increases at the initial moment. According to Figure 8(b), as c 1 increases, the time required for the walking vehicle estimated weight to reach stability decreases first and then increases. When c 1 is too large, the estimated weight oscillates around its stable value.

Simulations of Height and Speed Tracking of Load-Carrying Quadruped Walking Vehicle with Load Variations.
In order to verify the effectiveness of adaptive sliding mode control, the trotting gait simulations of load-carrying quadruped walking vehicle on flat ground and climbing slope are carried out. Based on the analysis in 6.1, the values of λ, η, D, and c 1 are 30, 1500, 30, and 150, respectively.

Simulations of Trotting Gait on Flat Ground.
e virtual model control algorithm and the method combining centroidal dynamics and adaptive sliding mode control are, respectively, used to make the walking vehicle trotting. e vehicle's expected height is 0.687 m, the expected forward speed is 0.8 m/s, the lateral speed is−0.2 m/s, and the expected attitude angles are 0. At about 5 s, a load with a weight of 60 kg falls on the vehicle torso, and the load leaves the torso at about 8 s. In this process, the vehicle's height, forward speed error, and lateral speed error are recorded. In the following figures, VMC represents the virtual model control, and CD + SMC stands for the centroidal dynamics and adaptive sliding mode control. Snapshots of the simulations are shown in Figure 9 below. Figure 9(b) shows the moment when the load and torso are about to contact, Figures 9(c)-9(h) show the interaction process of the load and torso, and Figure 9(i) shows the state when the load completely leaves the torso. After contacts with the walking vehicle, the load is not immediately stationary relative to the torso but is in a process of constantly changing position and attitude. So the forces of the load on the vehicle also change continuously.
According to Figure 10(a), when the load contacts with the torso, the weight of vehicle changes significantly. Due to the effects of weight change, the vehicle height changes significantly in the virtual model control algorithm.
erefore, the virtual model control algorithm cannot adapt to the weight change. When the proposed control method is adopted, the vehicle's height is maintained near the target value, which indicates that the proposed control method can adapt to the change in vehicle weight. According to Figure 10(b), the estimated weight can always follow the change of the vehicle weight. Since the legs' weight is neglected in control, the estimated weight is larger than the sum of torso weight (without load) and load weight. e forward speed and lateral speed of the two control methods are analyzed below.
For comparison, we calculate the absolute value of interaction forces between the load and the torso in the forward and lateral directions and further calculate the average of the absolute value, as shown in Figures 11(a) and 11(b). e forces in the proposed control method are greater than the forces in the virtual model control method. e differences between forward speed and lateral speed in the two control methods cannot be obtained intuitively from the speed diagram. erefore, we do the same calculations for speeds as for contact forces and the results are shown in Figures 11(c) and 11(d). According to Figures 11(c) and 11(d), the forward speed error of the proposed method is significantly smaller than that of the virtual model control method. Affected by a large force at the initial moment, the lateral speed error in the virtual model control method is small. However, after a short period of transition, the lateral speed control error of the proposed method is smaller than that of the virtual model control method.  Mathematical Problems in Engineering To a certain extent, it is proved that the method combining centroidal dynamics and adaptive sliding mode control can improve the control effect of forward speed and lateral speed of the walking vehicle.

Simulations of the Walking Vehicle Climbing Slope.
To further verify the effectiveness of the proposed control method, the process of walking vehicle climbing slope with trotting gait is simulated. A 30 kg load falls on the walking vehicle before it climbs the slope. When the walking vehicle is on the slope, the expected forward speed is 0.4 m/s, the expected lateral speed is 0, and the expected height is 0.687 m (torso coordinate frame). e virtual model control method and the proposed control method are used to make the walking vehicle trotting on the slope, and their control effects are compared. As in the previous section, VMC Mathematical Problems in Engineering represents the virtual model, and CD + SMC stands for the centroidal dynamics and adaptive sliding mode control. According to Figure 12, both control algorithms can realize the walking vehicle trotting on the slope with a load. However, due to the differences between the forces of the load and the torso, the change rules of the vehicle parameters are different in the two control algorithms.
According to Figure 13(a), the vehicle height deviates greatly from the expected value in the virtual model control method. However, the height can be maintained near the target value in the proposed control method. According to Figure 13(b), when the walking vehicle climbs the slope, the actual forward speed is about 33.3% lower than the expected speed in the virtual model control method. In contrast, the forward speed of the walking vehicle changes around the expected value in the proposed control method. According to Figure 13(c), in both control algorithms, the lateral speed fluctuates around the expected value. For the sake of comparison, we calculate the absolute value of lateral velocity and further calculate its average. e results are shown in Figure 13(d). According to Figure 13(d), in the virtual model control method, the lateral speed error is significantly greater than the error in the proposed control method. According to Figure 13(e), when the walking vehicle climbs the slope, the estimated weight can also follow the change of the vehicle weight. Besides, the interaction forces of the load and torso change greatly, resulting in fluctuations in the estimated weight. e trotting gait simulation of walking vehicle climbing slope further proves the adaptability of the proposed method to weight change and the tracking accuracy of the walking vehicle's forward speed and lateral speed.

Conclusions
In this paper, the centroidal dynamics of the walking vehicle are successfully combined with adaptive sliding mode control to ensure accurate tracking of the vehicle height and speed. After the weight is obtained by the adaptive sliding mode control in the height direction of the vehicle, the combined external forces of the torso are calculated by the centroidal dynamics to realize the motion control of the vehicle. e virtual model control method is applied to track the desired trajectories by swinging legs. e control method combining centroidal dynamics and adaptive sliding mode control has been successfully used for the trotting gait control of the walking vehicle on flat ground and climbing slope with load variations. e main contribution of this paper is a trotting gait control method for load-carrying quadruped walking vehicle with load variations. It realizes the adaptability to the load variations without much calculation and parameter adjustments. e parameters selection of the adaptive sliding mode controller has a great impact on the control effect. Although the control parameters are manually selected, the adaptive sliding mode controller still shows a good control effect.
In the next step, the attitude control when the walking vehicle's load varies will be studied, and the tracking error of the forward speed and lateral speed will be further reduced.

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