Quadrupedal Robots Whole-Body Motion Control Based on Centroidal Momentum Dynamics

In this paper, we demonstrate a method for quadruped dynamic locomotion based on centroidal momentum control. Our method relies on a quadratic program that solves an optimal control problem to track the reference rate of change of centroidal momentum as closely as possible while satisfying the dynamic, input, and contact constraints of the full quadruped robot dynamics. Given the desired footstep positions, the according reference rate of change of the centroidal momentum is formulated as a feedback control task derived from the CoM motions of a simplified model (linear inverted pendulum) based on Capture Point dynamics. The joint accelerations and the Ground Reaction Forces(GRFs) outputted from the quadratic program solver are used to calculate the desired joint torques using an inverse dynamics algorithm. The performance of the proposed method is tested in simulation and on real hardware.


Introduction
Legged robots are highly mobile and can walk over rough terrain with their discontinuous support motion.As a legged robot, quadruped robot, such as BigDog [1], Cheetah [2], Anymal [3] and HyQ [4], have a great potential for applications in complex environments.
Recently, agility and dynamic skills have been demonstrated by the Massachusetts Institute of Technology's (MIT) Cheetah robots, which are actuated with a unique electric actuation system [2].Cheetah 1 [5], a planar quadruped platform can run up to speeds at 3.2 m/s in plane experiments, using proprioceptive touchdown feedback and programmable leg compliance.Cheetah 2 is skilled enough to bound over obstacles using an MPC controller [6].A time-switched impulse scaling principles, which generalize the control parameters, allowing the Cheetah 2 robot to run at speeds of up to 6.4 m/s [7,8].The event-based framework based on the contact detection algorithm [9,10] allows the Cheetah 3 robot to leap and gallop across unstructured terrain with obstacles and climb a staircase littered with debris without relying on external sensing information of the environment.The IIT HyQ quadruped has shown a control architecture for quadrupedal quasi-static walking over challenging inclined terrain [11].Dynamic trotting gaits have also been demonstrated in [12] using bio-inspired nonlinear oscillators.
Using inverse dynamics for a floating base multi-body systems (MBS) force control has become a popular topic.Khatib [13] was the first to propose this broad category.The advantage of this approach is that the control problem change under a transformation to coordinates of the task-space coordinates.It is effective for applications involving the end-effector at contact with a highly stiff surface.Joint torques are computed using the inertia matrix, which is required for pseudoinverse computations and projections.Taking the unilateral contact and friction into account and based on a convex optimization to solve an optimal control problem, the reference motion in the operational space of the robot can be tracked perfectly [14].Although detailed formulations differ, numerous optimization problems are phrased as cascades of quadratic programming (QP) to solve the floating base inverse dynamics.Hierarchical operational-space inverse dynamics control framework rely on a least-squares method specifically considering the effects of contact interactions has been proposed and applied to StarlETH [15].Ref. [16] demonstrates a control architecture rely on a whole-body control framework that allows ANYmal to execute dynamic gaits, such as pronking and running trot.
A successive approach for whole-body humanoid locomotion control based on centroidal momentum rise in popularity [17,18], because it is more robust to disturbances than inverse dynamics-based control strategies [19].The momentum of a floating base MBS is comprised of its linear momentum and angular momentum.The centroidal momentum of a floating base MBS is added to its linked momentum, which is referred to as the robot centroid or Center of Mass (CoM).Kajita was the first to propose a approach to generate whole body motion of robot with given reference momentum, named this approach the Resolved Momentum Control [20].The humanoid robot HRP-2 has demonstrated its application for balance maintenance and the HRP-2LR robot [21] achieved running gaits based on the Resolved Momentum Control.Orin and Goswami indicated that the centroidal momentum are linearly related to joint velocities [22].They introduced the centroidal momentum matrix (CMM), which represents the linear sensitivity of centroidal momentum to the joint velocities.They recognized the fact that this matrix is a function of the inertia and Jacobian matrix.Specialized algorithms to compute the CMM were originally presented by Wensing and Orin in [23].They noted that the CMM and the bias force can be computed though the mass matrix, Coriolis force and the kinematics of the floating-base.Based on this work, the humanoid robot achieves a dynamic kick and dynamic jump in the simulation.
The novel contributions of this paper include:

•
The presentation of trotting gait with a quadruped robot based on centroidal momentum dynamics controller.While the robot is under-actuated, we sacrifice the lateral component of linear momentum to aid stability of Capture Point trajectory tracking.The controller is robust to errors in the inertial parameters (such as mass) of the robot.

•
Using Capture Point methodology to generate the desired motion of the quadruped robot.

•
We demonstrate a method to establish the dynamics equations of a floating base systems into a closed-form, which is convenient to compute and analyze the centroidal momentum dynamics.
The remainder of this paper is organized as follows.Section 2 demonstrates the framework of the centroidal momentum control application for quadrupedal robot dynamic motion.The method demonstrated in the previous sections are tested in simulations and on the physical prototype in Section 3. Finally, the conclusions of this paper are presented in Section 4.

Methods
The following subsection introduces our control framework.The dynamics equations of the quadruped robot are established in Section 2.1 and then the centroidal dynamics of the quadruped robot are obtained in Section 2.2.Section 2.3 demonstrates the framework of centroidal momentum control application for quadrupedal robot dynamic motion.

Dynamics Equation of Floating Base Systems
Dynamic-based approaches play an important role in legged robot dynamic locomotion because they have strong disturbance resisting ability.The modelling presents an inherent complexity, mainly due to the joint variables must satisfy several loop-closure constraint equations.Several algorithms have been used to the dynamic modelling of floating base systems.In this paper, we employ the Newton-Euler inverse dynamics algorithm organized into a closed-form [24] to establish the dynamics equation of the quadruped robot.
Consider the quadrupedal robot shown in Figure 1.For modelling purposes, we attach a base reference frame to the robot and assume that the base frame can freely move relative to a fixed inertial frame.Figure 1 illustrates this representation by showing the 6 virtual degrees of freedom (θ b ∈ R 6 is the position and orientation of the coordinate system attached to the robot base, measured with respect to the fixed inertial frame).

Inertial Frame Body Frame 6 unactuated virtual DOFs
Figure 1.The base frame attached to the robot is connected to the inertial frame via 6 unactuated virtual DOFs.
As shown in Figure 2. The system can be partitioned into four subsystems (the inertia tensor for the body is also divided into four parts).We can write the dynamic equation for the four chains as follows: where and τ i ∈ R 3 denote the mass matrix, the force vector as the sum of the Coriolis and centrifugal forces, gravitational forces, the actuated joint selection matrix and the actuator torque, respectively.Limbs in contact with the ground are modelled as point contacts (with 3 forces).The Ground Reaction Forces (GRFs) at the contact points are mapped to the joint space torques through the Jacobian

Inertial Frame
Body Frame

unactuated virtual DOFs
Subsys.RH Subsys.RF For floating-base systems, such as a quadruped robot, the dynamic in Equation ( 1) can be divided into floating-base and actuated components where All the four subsystems are clustered together, and we obtain the dynamics equation of the quadruped robot in a closed form where where m is the number of limbs in contact, and the Jacobian J ∈ R k×18 projects the Ground Reaction Forces (GRFs) f ∈ R k (k = 3m) at the contact points to the joint space torques.S = [0 12×6 I 12×12 ].Equation ( 3) can be written explicitly as

Centroidal Dynamics
The centroidal momentum of the quadruped robot is the total momenta of its links, defined in centroidal frame.The centroidal frame locate in the instantaneous center of mass (COM) position and aligned with the world frame [18].The centroidal momentum of the quadruped robot consists of its linear momentum l ∈ R 3 and its angular momentum where A is called the CMM.The rate of the centroidal momentum is often required for dynamic whole-body controllers.The differentiation of ( 10) can be written in the following forms: These centroidal dynamics are in connection with the external wrench (force/torque) on the quadrupedal robot.The Newton's and Euler's laws states that ḣ be equal to the net external wrench (force/torque about the instantaneous CoM) on the quadrupedal robot.
where W g = mg T 0 1×3 T is the wrench due to gravity, and W grd,i are the ground reaction wrenches exerted upon the limbs in contact with the ground.Note that the rate of the change of momentum is unaffected by forces or torques internal to the quadrupedal robot.The CMM A and bias Ȧ θ can be calculated, using the mass matrix H(θ) and the Coriolis term C(θ) through the spatial transform 1 X T G , which was proposed by Wensing in [23]

Application to Quadrupedal Robot Dynamic Motion
This section demonstrates the application of centroidal momentum control to the dynamic motion of a quadruped robot.Figure 3 shows the block diagram of our control framework.The set of future footprints are given from high level behaviour, and the reference walking pattern of the quadruped robot is generated based on the Capture Point dynamics in Section 2.3.1.The motion of the robot is projected according to the walking pattern.The according reference rate of change of the centroidal momentum is formulated as a feedback control task derived from the CoM motions of the quadrupedal robot in Section 2.3.2.We design a QP to solve an optimal control problem to track the reference rate of change of the centroidal momentum as closely as possible while satisfying the constraints in Section 2.3.3.The joint accelerations and the Ground Reaction Forces (GRFs) outputted from the quadratic programme solver are used to compute the reference joint control torques using an inverse dynamics algorithm.The application of the whole-body control system based on centroidal momentum to control a quadruped robot dynamic motion is shown in Section 2.3.4.

Walking Pattern based on Capture Point Dynamics
The walking pattern is defined as a set of time series of joint angles for the desired walking [25].To ensure stable walking, a reduced model of the robot is indispensable.Recently, the linear inverted pendulum model (LIPM) required for the control of bipedal walking robots rise in popularity [26][27][28][29][30].
Once the walking pattern is using simple models, such as the LIPM, the motion of the robot can be equivalent to the motion of the centre of mass of the robot and the motion of the supporting foot.In general, the walking pattern was generated with a predetermined footstep position.If a set of time series of robot footstep positions is given, the set of time series of the CoM trajectory of the robot is the general walking pattern [31].
In the simplified model, when a quadruped robot is supporting its body on two legs, the behaviour of a pair of legs acting in unison can be represented by an equivalent virtual leg [32].In this paper, we extend the concept of virtual leg.No matter how many legs in contact with the ground, it can be equivalent to a virtual leg, as depicted in Figure 4. GRFs F i at the contact point can be mapped to the CoM though the matrix B. where . We assume that the virtual foot is located at the midpoint between the two supporting foot, which strike the ground recnetly.Its dominant dynamics can be represented by a single inverted pendulum, which is comprised of a point mass and a massless telescopic leg in contact with the ground.According to LIPM, the relationship between the CoM and P vl can be expressed as follows: where x, y and z denote the horizontal, lateral and vertical CoM position, p x and p y denote the horizontal and lateral position of the virtual leg, τ y and τ x denote the torque about the y axis and x axis of CoM, m is the total mass of the quadruped robot and g is the acceleration due to gravity.The Linear Inverted Pendulum Model, described by Kajita et al. [26,27] assumes that the height of the CoM remains constant and the change in the rotational momentum about the CoM is zero.
Based on these assumptions, the dynamic equations of the robot are linear and decoupled, and the relationship between the CoM and P can be written: where w= g/z 0 is the natural frequency of the pendulum.Pratt et al. derive the unstable part of LIPM from its orbital energy and named it the Capture Point [33].This is the point on the floor where the robot (modelled as an LIPM) has to step to come to a complete rest.Equivalent values of the Capture Point have been analysed by Hof as the 'extrapolated center of mass' in [34] and DCM by Takenaka et al. in [35].The Capture Point is comprised of the horizontal CoM position, velocity, and the natural frequency of the pendulum.It can be expressed as: The equation of the Capture Point can be rewritten as We find that x and y has a stable first-order open loop dynamics with a time constant 1 w .Inserting Equations and (19) in Equation ( 17) then gives The Capture Point ξ= ξ x ξ y T has an unstable first-order open loop dynamics.The CoM naturally follows the Capture Point, and the Capture Point dynamics is pushed away by the P = p x p y T with an unstable first-order dynamics.If the Capture Point dynamics is controlled to be stable, the CoM dynamics are naturally stabilized.The equation of ( 20) can be solved into the time domain in the form of (21) to calculate the Capture Point value in the futures to produce a Capture Point trajectory, which corresponds to a constant position of the virtual foot of the pre-planned future foot positions P d,i by shifting the Capture Point during a step from one footprint to the next.
The desired Capture Point locations at the beginning of each step ξ d,ini,i are found via recursion, which was proposed by Englsberger [28].
Given a desired set of time series of quadruped robot footstep positions P d of a virtual leg, the Capture Point trajectory can be obtained from Equation (21).The desired velocity v = ẋ ẏ T of the CoM can be obtained by Equation (19).

Desired Centroidal Momentum for Motion Control
The motion of the robot is determined by the desired linear and angular momentum rate change.For angular momentum, we employ the PD feedback control policy to regulate the CoM orientation.When the robot is walking in a straight line, q d,b is set to zero.
To encode a whole-body rotation given the desired motion plan, ĪG can be found from the mass matrix by computing the centroidal composite-rigid-body inertia of the system I G about the CoM.
For linear momentum, a commanded lG,d is formed from the PD control on the desired CoM The desired velocity of the CoM ṙx b,d and ṙy b,d is the output of the walking pattern, which is described in Section 2.3.1.The CoM height r z b,d is often assumed to be constant.∈ R 18+k of the desired joint accelerations and GRFs for the full robot dynamics that minimizes Equation (27), which is a quadratic motion cost to track the reference rate of change of the centroidal momentum as closely as possible while satisfying the dynamic, input, and contact constraints of the full quadruped robot dynamics.
The matrices Q and W are weighting matrices.The relationship between the accelerations θ and the GRFs f can be found though the floating base system dynamics equation constraint (28).Since legs in contact with the ground are not allowed to move, Equation ( 29) is a no-slip constraint on the foot contacts, requiring that their acceleration be negatively proportional to the velocity.To improve the track of the desired motion determined by the high level controller, we constrain the joint accelerations and by implementing operational space controllers with feed-forward reference acceleration and a motion dependent feedback state in the constraint in Equation (30).Where To avoid slipping, the constraint ensures that contact forces should be constrained to lie in the friction cone, which is aligned normal to the contact surface, where µ is the friction coefficient.To write these as linear constraints, we approximate the friction cones with pyramids, which was proposed by Dario Bellicoso in [36].Equation (32) ensure that the joint actuation torques cannot exceed the rated torques.
The formulation is solved based on Active-set method.This QP is solved for every controller time step for the joint acceleration and the GRFs.Given the desired joint acceleration and the GRFs, we compute the reference joint torques though

Whole Body Control System
A feedforward and feedback control system is designed to generate a robust walking gait in Figure 3. From a set of time series of quadruped robot footstep positions, a target Capture Point reference ξ is calculated.The desired velocity of the CoM can be obtained by Equation ( 17) based on the current robot state x (Section 2.3.1).The desired momentum rate of change is provided by Equations ( 23) and ( 25) (Section 2.3.2).Meanwhile, the swing foot trajectory based on quintics order polynomials will be generated.Given a desired rate of change of the centroidal momentum, and taking the swing foot motion, floating base system dynamics equation, limitations on the GRF, joint torque limits and contact motion as constraints, we set up a QP (Section 2.3.3).The QP solver outputs the joint accelerations and GRFS, which are then used to calculate the desired joint torques using an inverse dynamics algorithm via Equation (34).While in simulations it is possible to directly apply the joint torques computed by the whole-body control system, the physical quadruped robot can only be controlled through motor current commands.Because of the errors between the multibody model and the real robot, during the swing motion we increase the PD gains of the swing leg joints to improve the tracking capabilities.Overall, we compute the desired torques τ swing,d though: where τ swing f f is the swing leg inverse dynamics feed-forward term computed using Equation (34) and τ swing f d is the swing leg joints PD feed-back term computed via a standard PD controller using Equation (36), where K P, f f > 0, K P,swing > 0 and K D,swing > 0 are the feed-forward proportional gain, feed-back proportional gain and differential gain, respectively.The desired swing leg joint angle positions and velocities θ swing,d and θswing,d can be computed though inverse kinematics.This control law is a trade-off between the torque control and joint position control.The torque control provide compliant motions and robustness to external perturbations but is sensitive to dynamics model errors (usually uses a mix of CAD-based data and estimated parameters) and forces from joint friction, whereas the velocity control results in a high impedance behaviour that is insensitive to dynamics model errors.By the use of the inverse dynamics feed-forward term and the joint position control gains, we were able to strike a compromise between the tracking capabilities of the desired swing leg motion and being reasonably compliant to external disturbances that let the quadruped robot to move on a variety of terrains.

Experimental Results and Discussion
The method described in the previous sections was tested in simulations and on physical prototype.We demonstrate successful trotting in simulation and with a physical prototype.
A high level behaviour defines the sequence of the swing and stance modes for each leg with respect to time, such as a trotting gait, as demonstrated in Figure 5.The dark areas indicate the fraction of the stride when a leg is in the swing phase, which is characterized by the relative timing of the lift-off and touch-down events.A dark line indicates that a leg is in swing mode.It is interesting to note that a short with four contact points phase is planned to be allowed, since trotting in double support is truly under-actuated and over-constrained at the same time (rank (B) = 5) and five of the floating base's six degrees of freedom can be controlled though the GRFS.An over-constrained situation is the result of a short four contact points support phase, which provides compliant motions and stable walking over rough terrain.When the robot is in over-constrained situation, there are many ways to adapt the robot motion behavior to track the motion task [37].In this paper, with all kinds of constraints are satisfied, the highest priority was assigned to track the desired rate of change of centroidal momentum.We address the highest priority task and try to minimize the GRFs.During all phases except the double support state, only the diagonal elements of the weighting matrices Q in the QP in Equation ( 27) are set to 1.During the double support state, the weighting matrices Q = diag [1, 0, 1, 1, 1, 1] so that the whole-body control system will not take the lateral component of linear momentum rate of change into account.The weighting matrices for the GRFs W = 0.01I.

Simulation
The method described in the previous sections has been performed in simulation.The robot walks forward.The desired step length was set to 10cm and the desired time per step to 0.25 s. (blue curve depicted in Figure 6).The simulation results are displayed in Figure 6.The method described in this paper show a reasonably good tracking of the desired Capture Point trajectory (yellow curve in Figure 6).While walking steadily, the robot is able to robustly trotting with an average speed of 0.4 m/s, as shown in Figure 7.We note that while the robot trots in place the disturbance to its attitude is very small; the pitch, the roll and the yaw of the robot oscillate with an amplitude less than 0.01 rad in Figure 8.
When the left front leg is in the swing phase, τ m =τ * .When the left front leg is in the stance phase, It is observed that τ * provides a minority of the total torque whereas −J leg stance T f (torque against the GRFs at the foot) play a prominent role, indicating that the torque is insensitive to the dynamics model errors.This is why we chose to use a PD feed-back joint position control only for legs in swing mode.In order to test the controller is robust to errors in the inertial parameters (such as mass) of the robot, we changed the mass of the robot and the controller remains the same.Figure 12 summarizes the results.The results show a very good tracking of the reference Capture Point trajectories which indicated that the centroidal momentum-based controller based on centroidal momentum is robust to the robot mass errors.

Experiment
The developed control algorithms were tested on a physical prototype of a quadruped robot.Table 1 lists the detailed Physical Robot Parameters.The physical prototype has three degrees of freedom per leg actuated by electric motors.Each actuator can be controlled at 200 Hz by a torque control loop from a Linux host computer through EtherCAT communication.Four contact sensors (one on each foot), positioned in each foot, and an IMU is fixedly installed for measuring the body orientation and angular velocity.The CoM position and linear velocity is currently estimated by means of the robot's kinematics.The task for the robot was exactly the same as in the simulations: walking forward with a stride of 10 cm and a step time of 0.25 s.The results of the experiments are shown in Figures 13-16.Several limitations of the the physical prototype affect the performance of the control framework.Communication latency is one of the main sources of limitations, which allowed us to tune down the gains for controller.State estimation is another sources of limitations.Now, linear velocity is currently estimated by means of the robot's kinematics.We use low-pass filters to process the sensor noise from the joint velocities, which lead to phase delay.In the future, we may employ a state estimator based on an extended Kalman filter.

Figure 2 .
Figure 2. Segmentation of the floating base systems.

Figure 3 .
Figure 3.The whole body control system based on centroidal dynamics.P d is the desired footprint from a high level behaviour.v is the desired velocity of CoM.ḣd is the desired rate of change of the centroidal momentum.p, ṗ, pswing_d are the desired position, velocity and acceleration of the swing foot in Cartesian space, respectively.

3 F 4 P 4 FPvlFigure 4 .
Figure 4.The simplification of the quadruped robot to the Linear Inverted Pendulum model.

Figure 5 .
Figure 5. Gait graph for a walking trot: the black bars defines the stance phase of the left hind (LH), left front (LF), right front (RF), and right hind (RH) leg.

Figure 6 .
Figure 6.Comparison of the desired Footprint from a high planner, the desired and the actual Capture Point trajectory.

Figure 7 .
Figure 7.Comparison of the desired and actual CoM horizontal speed trajectories.

Figure 8 .
Figure 8.The attitude of the robot in the simulation.Snapshots of the robot trotting in the simulation are shown in Figure 9.The joint torques of the left front leg of the quadruped robot during a forward velocity of 0.4 m/s are shown in Figure 10.According to Equation (9), τ m = τ * − J leg stance T f , where τ * = H * 1 (θ) H * * (θ) θb q + C * (θ, θ) + G * (θ).

Figure 9 .
Figure 9. Snapshots of the robot trotting in the simulation.

Figure 10 .
Figure 10.Joint torques of the quadruped robot during a forward velocity of ~0.4m/s.τ m is the torque at the joint, τ * is the torque to move the robot that are in contact with the ground.The torques stay well below the physical torque limit of 30 Nm.

Figure 11 Figure 11 .
Figure11show the phase portraits of the states.It is clear that the solution converges to a limit cycle.

Figure 12 .
Figure 12. ξ x error of different mass error.

Figure 14 .
Figure 14.The attitude of the robot on the physical prototype experiment.

Figure 15 .
Figure 15.Snapshots of trotting at 0.4 m/s on the physical prototype experiment.

Figure 16 .
Figure 16.(a) Phase portrait of the hip joint on the physical prototype; (b) Phase portrait of the knee joint on the physical prototype.