{'fraction_non_alphanumeric': 0.03452561264515127, 'fraction_numerical': 0.008233329449687367, 'mean_word_length': 4.571181306793596, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards Exact Interaction Force Control for Underactuated Quadrupedal Systems with Orthogonal Projection and Quadratic Programming

Projected Inverse Dynamics Control (PIDC) is commonly used in robots subject to contact, especially in quadrupedal systems. Many methods based on such dynamics have been developed for quadrupedal locomotion tasks, and only a few works studied simple interactions between the robot and environment, such as pressing an E-stop button. To facilitate the interaction requiring exact force control for safety, we propose a novel interaction force control scheme for underactuated quadrupedal systems relying on projection techniques and Quadratic Programming (QP). This algorithm allows the robot to apply a desired interaction force to the environment without using force sensors while satisfying physical constraints and inducing minimal base motion. Unlike previous projection-based methods, the QP design uses two selection matrices in its hierarchical structure, facilitating the decoupling between force and motion control. The proposed algorithm is verified with a quadrupedal robot in a high-fidelity simulator. Compared to the QP designs without the strategy of using two selection matrices and the PIDC method for contact force control, our method provided more accurate contact force tracking performance with minimal base movement, paving the way to approach the exact interaction force control for underactuated quadrupedal systems.


I. INTRODUCTION
Quadrupedal systems, whose six Degree of Freedom (DoF) floating base is considered to be passively connected to an inertial frame, are generally underactuated. To control such systems for locomotion and manipulation in realworld deployment, underactuation must be addressed while designing a whole-body controller. A paradigm based on orthogonal projection and Quadratic Programming (QP) has been exploited. Within it, a projection matrix stems from the contact between a foot or an additional arm and the environment, helping eliminate contact forces and thus reducing variables in optimization. Besides, the projection matrix can create two spaces: motion space and constraint space, allowing more freedom for task-oriented applications. QP can minimize a quadratic cost that resolves underactuation and accommodate constraints such as unilateral contact and friction cones. This paradigm normally works for locomotion tasks or simple interaction tasks like pressing an emergency button [1]. However, it is still open to using such a paradigm to achieve interaction applications that need exact force control. For example, as shown in Fig. 1, a robot uses one leg A scenario of a quadrupedal robot exerting desired force on the environment. Here, exact interaction force control of the raised leg is preferred, because, on the one hand, it can succeed to maintain pressing the button and keep the elevator door open, and on the other hand, the robot will keep standing without falling.
to keep pressing a button for allowing other robots to move into an elevator, and the robot can keep standing and have minimal base movement at the same time. In this case, exact force control is preferred for avoiding the robot's falling since impedance control for inducing force may generate external force disturbance due to an unknown environment. Motivated by this need, in this paper, we focus on how the underactuated quadrupedal system applies an exact force to the environment subject to physical constraints and minimal disturbance on the robot's base.
Projection-based methods have a long history. Projected Inverse Dynamics Control (PIDC) was first proposed for fully-actuated systems in [2], paving the way to design controllers in motion and constraint space. Some researchers extended this idea to underactuated systems [3]- [6]. For example, the work [4] used either null space motion or constraint forces to resolve underactuation without affecting task-space dynamics, while [6] only made use of constraint forces. The aforementioned studies focused on motion control levels, and their constraint forces do not need to be specially considered in the controller. To impose more authority on the constraint force for underactuated applications, the constraint force is optimized within constraint space to maintain contact [7], [8]. For example, [8] designed an optimization problem to seek the optimal contact wrenches that minimize torques while satisfying physical constraints and compensating external forces. Although the constraint force/wrench was specially treated, those methods still cannot provide an exact con-tact force actively since the force/wrench was implicitly manipulated. Previously, explicitly tracking desired contact forces in quadrupedal systems was implemented in [9] but required planning on both desired position trajectories and desired contact forces at the same time if imposing higher priority on force control than motion control, because desired accelerations affected realizable contact forces. The tracking of planned force profiles may not be suitable for tasks requiring fast reaction (e.g., tracking desired interaction force command from users); thus, a reactive control scheme is preferable.
To this end, to approach an exact force output, we propose a novel interaction force control scheme for underactuated quadrupedal systems in the sense of reaction control. It allows the system (e.g., using a foot) to apply a force as precisely as possible to the environment, without requiring force planning. Our scheme uses two QP designs that resolve the underactuation problem by splitting it into two orthogonal spaces: motion and constraint space, and then optimizing the cost in each space in a hierarchical order. Physical limitations (i.e., unilateral contact, torque limits, and friction cones) are also considered as inequality constraints in the design. To decouple force and motion control and accomplish the exact constraint force control as much as possible, we apply two selection matrices, in which one of them distributes the desired force control task to the designated joints, and another one selects the rest joints for the underlying motion task. For instance, as shown in Fig. 1, a quadrupedal robot uses its front right leg for force control, while the other three legs support its base and conduct the motion task of the base. These two selection matrices select the front right leg and the other three legs for the force and motion control, respectively. In summary, our control scheme is a reactive control (e.g., can respond to user-defined force inputs fast) that does not rely on any motion planning techniques and force sensors (FS), and induces minimal base motion.
The contributions of this paper are: 1) Presenting a novel interaction force control scheme for underactuated quadrupedal systems that does not require motion planning and FS. 2) For resolving the underactuation problem, we propose a hierarchical QP structure that minimizes the cost function for the motion and force control in motion and constraint space, respectively. To reduce the coupling effect between motion and force control, two selection matrices are deployed, allowing us to decouple force and motion to the greatest extent and thus approach the exact force control.

II. BACKGROUND A. Projected Inverse Dynamics with External Disturbance
The dynamics equation of a quadruped robot can be expressed as: where q = q T b , q T j T is the generalized coordinate vector including unactuated floating base coordinates q b ∈ SE(3) and actuated joint configuration q j ∈ R nj , M ∈ R (6+nj )×(6+nj ) denotes the inertia matrix, h ∈ R (6+nj ) is the non-linear effect consisting of Coriolis, centrifugal and gravitational forces, B = 0 nj ×6 , I nj ×nj T is the selection matrix 1 of actuated joints, τ ∈ R nj is the actuated joint torques, J c ∈ R k×(6+nj ) represents the constraint Jacobian with k = 3n c (n c denotes the number of legs in contact with the environment and the contact is assumed as a point contact), λ ∈ R k denotes the generalized constraint force vector used to control unactuated q b , J x ∈ R ne×(6+nj ) is the Jacobian at x, and F x ∈ R ne is the external disturbances due to the interaction from human or environments. During locomotion, the support feet should not slip, i.e., the constraint J cq = 0 must be satisfied. This constraint indicates that any admissibleq lies in the constraint null space N (J c ). According to [10], the dynamics equation (1) can be projected into two subspaces by using the orthogonal projection matrix P and I − P respectively as: c J c implies that the orthogonal null space projection matrix is computed from the Moore-Penrose pseudoinverse of J c and projects vectors into the null space of the constraint, such that P = P 2 = P T , P J T c = 0, and Pq =q for allq ∈ N (J c ). Then I − P represents the complementary projection into N ⊥ (J c ).
To solve the equation of λ,q must be computed first. However,q cannot be obtained directly through pre-multiplying the inverse of P M in (2), as P M cannot be inverted attributed to the rank deficiency of P . With the help of additional equations (I − P )q = 0 and its derivative (I − P )q =Ṗq that are derived from Pq =q,q can be solved by substituting the latter equation into (2) as: where M c = P M + I − P . Equations (4) shows that only the motion torques τ m contributes to the motion of the system, therefore N (J c ) is called the motion space as described in [6]. Similarly, because in (3) theq is fixed and constraint forces λ are free to choose depending on the constraint torques τ c , N ⊥ (J c ) is named the constraint space. Eventually, the constraint forces are obtained by insertingq into (3) and yields: withM = M M −1 c , and is the constraint inertia matrix and is always invertible [10]. More details can be found in [6].

B. Cartesian Impedance Control in Task-Space
To achieve the desired locomotion behavior, a Cartesian impedance controller is applied to the robot. We start with a closed-loop system equation that reflects a mechanical impedance of the end-effector in multi-dimension to the external disturbance F x , as: where e = x − x d denotes the pose error of the end-effector between the current and desired one, Λ d , K d , and K p are the desired task-space inertia, damping, and stiffness matrices. Note that the torso and swing feet can be treated as the endeffector during the controller design. Again, we apply the equation (I − P )q =Ṗq, as we compute the expression ofq in Section II-A, to equation (2), then pre-multiply the resultant equation by J x M −1 c , replace J xq withẍ −J xq , and pre-multiply it by the operational space inertia matrix where J x is the task Jacobian defined byẋ = J xq , and At this moment, we consider the robot is fully actuated, such that: with F d,x is the designed control law, and τ m,d is the desired motion torques. Then, equation (7) will be simplified as: The control law F d,x can be defined to achieve the impedance response of equation (6) as: where Λ d = Λ c is assigned [11].
x is not invertible when J x has rank deficiency. We use Singular Value Decomposition (SVD) to remove the eigenvalues equal or close to zero for the approximation of Λ c .

Remark 2.
Consider the torso and swing feet as endeffectors, all J x above can be replaced by the Jacobian matrix of the torso J b ∈ R 6×(6+nj ) and of the i-th foot J i ∈ R 3×(6+nj ) , and the control law F d,x can be represented by F d,b ∈ R 6 for the torso and F d,i ∈ R 3 for the foot.
C. Contact Force Control in Constraint Space Assumption 1. The desired force λ d is selected within a feasible force region that will not cause the robot to fall. Determining the feasible force region is out of the scope of this paper.
As described in Section II-A, onceq is determined, the contact forces can be controlled by applying corresponding constraint torques. This has been shown in [12], [13], where the robot executed a desired motion and applied a desired force at the contact point simultaneously. Here, we extend the constraint torques control law τ c,d with the external disturbance by: Remark 3. The external force F x can be estimated by equation (6). In this case, the usage of the FS can be avoided.
The complete torque commands that can accomplish the desired motion and contact force are the sum of τ m,d and τ c,d , i.e.: Remark 4. If the contact force control is not concerned, τ c,d can be set to zero vector. In this case, the contact forces are controlled implicitly 2 , since from (11) τ c,d = 0 implies: which are the contact forces (or in general, the constraint forces) needed to remain the constraint J cq = 0. It reveals that when the PIDC method is considered for pure motion control, the contact forces required to satisfy the constraint are inherently fulfilled. This virtue has rarely been studied and discussed in the prior literature.

III. PROPOSED CONTROL SCHEME
The schematic of our proposed controller can be seen in Fig. 2.

A. Motivation
In Section II-B and II-C, the systems are assumed to be fully actuated when deriving the desired motion and constraint torque commands. However, Bτ = τ d in general for underactuated robots. To satisfy the underactuation constraint Bτ = τ d , [7] extended the PIDC formulation for the underactuated systems to realize the contact-consistent motion and contact force control by adding an additional constraint torques (I − P )τ u to equation (12) as: Indeed, the additional constraint torques (I − P )τ u does not generate any motion to violate the underlying task, but it derails the force control from its desired value, as τ c,d and (I − P )τ u are both in the constraint space. In other words, this approach fails to achieve exact force control even at any of all contact points.
Exact interaction force control is an essential technique to accomplish many real tasks, e.g., grinding, polishing, and screwing. This control problem has been widely studied for fully actuated robots. Nevertheless, our work focuses on extending the PIDC framework for the underactuated systems, specifically, the floating base quadrupedal robots, towards exerting an accurate desired active force at the contact point.
Compared to the methods used in [4], [6], [7], we aim to directly find an optimal solution that solves the optimization problem min Bτ − τ d 2 without inducing any additional null space components or constraint forces. However, because of the underactuation as mentioned in [5], [14], the desired motion and contact forces cannot be implemented by directly solving this optimization problem. Fortunately, [14] offers an idea of constrained hierarchical optimization that orthogonally decomposes the error norm into two subspaces at first, where Bτ − τ d 2 P and Bτ − τ d 2 I−P are the motion space and constraint space error norm, respectively. Then, the optimization problem of (15) will be solved hierarchically in the motion and constraint space. Following the constrained hierarchical optimization formulation, the rest of this section outlines our PIDC-based method for the contact force control of the underactuated robots without using FS at the contact point.

B. Motion Control for Underlying Task
As stated in [10], the constraint forces λ are affected by the constraint torques τ c directly and motion torques τ m indirectly via a cross-coupling factor µ = (I − P )M . It is apparent that τ m must be determined first, otherwise determining τ m afterward would affect the contact force control. Similar ideas have also been seen in [7], [8], [12], [13], [15]. Therefore, the motion space error norm is minimized at first.
The selection matrix B can be decomposed into two selection matrices B = B m + B f , where B m selects the actuators to perform the desired underlying motion, and B f selects the actuators for the desired contact force control. An intuitive instance would be a quadruped robot using its front right leg to impose a desired contact force on the button while using the other legs to hold the desired torso pose, as shown in Fig. 1. In this case, B f activates the front right leg to exert the desired interaction force, whereas B m activates the remaining legs for the motion task. This decomposition of the selection matrix can also be generalized to other underactuation systems, e.g., collaborative manipulation of the multi-robot team on a free-floating object [7], [8], [15]. Based on the selection matrices design, (15) can be further decomposed into: (16) where B f τ in motion space and B m τ in constraint space are set to zero vector, respectively, because we do not expect that the joints used for the force control contribute to the motion task, and vice versa. Thus, the optimization problem in motion space becomes: where (17b) is the actuation torque limits of the robot.
Here, the pre-multiplication of B T is to extract the actuated joints from the vertical concatenation vector of all the underactuated and actuated joints, because it is not a square matrix. Note the other physical constraints including unilateral contact and friction cones are considered within the optimization in the constraint space.

C. Contact Force Control
Since the motion space error norm has been minimized, we need to optimize the constraint space error norm subject to the physical constraints.
1) Modeling of Unilateral and Friction Cone Constraint: Assume λ i ∈ R 3 is a contact force at the i-th contact point, n x,i , n y,i , n z,i ∈ R 3 are the heading, lateral, and normal vector of the contact surface, and µ i is the friction coefficient. The unilateral and friction cone constraint at this point is: where d, d ∈ R 5 are the lower/upper bound vector, C i ∈ R 5×3 is a constraint matrix at the i-th contact point. The first four rows of (18) describe the approximated friction cone model (i.e., the friction pyramid [16]), whereas the last row encodes the unilateral constraint. Consider making these constraints at all contact points in a compact form, it can be expressed as: with D, D ∈ R 5nc are the stacked lower/upper bound vector, and C ∈ R 5nc×3nc is a block diagonal matrix that includes all constraint matrices.

2) Unilateral and Friction Cone Constraint at Contact Point(s) for Underlying Motion:
Assume n m is the number of contact points for the motion task, and n f is the number for the force control task, such that n c = n m +n f . As Section III-B mentioned, the physical constraints of the contact forces needed to implement the desired motion task for an underactuated system are considered as inequality constraints within the optimization of the constraint space error norm. According to (5), these constraint forces λ m ∈ R 3nm can be computed as: whereJ c,m ∈ R 3nm×(6+nj ) represents the constraint Jacobian for the desired motion task, the motion torques τ m of (5) is substituted with P B m τ * I , and the constraint torques τ c is replaced by (I − P )B m τ that contains the decision variable τ . Note that the B m before τ distributes the torque commands only to the designated joints.
Similar to (19), the constraints of λ m would be: with D m , D m ∈ R 5nm , and C m ∈ R 5nm×3nm is a block diagonal matrix that includes the constraint matrices only for the motion task.
3) Unilateral and Friction Cone Constraint at Contact Point(s) for Force Control: Akin to (20), the contact forces λ f ∈ R 3n f for the force control is obtained based on (5): with J c,f ∈ R 3n f ×(6+nj ) denotes the constraint Jacobian for the force control. Note that the motion torques τ m of (5) is set to zero vector here because the joints for the desired contact force control are not contributing to the motion control task. And constraint torques τ c is substituted with (I − P )B f τ such that only the designated actuators can contribute to the force control task. Similarly, the physical constraints of λ f would be: with D f , D f ∈ R 5n f , and C f ∈ R 5n f ×3n f is a block diagonal matrix including the constraint matrices only for the force control task.

4) Torque Limits:
To make sure the sum of the optimal torques obtained from the optimization of the motion space and constraint space error norm satisfies the actuator saturation limits, the torque limit constraints can be calculated as: The optimization objective is to find the torques that can achieve the desired contact force control. Following the idea from [14], we design the cost function as: min Based on the detail of 1) -5), the optimization in the constraint space is summarized as: Eventually, the ultimate controller can be defined similar to (12): where the first term on the right side implies the joint torques contributing to the desired motion control of the underactuated systems, while the second term only devotes to the desired contact force control.

IV. VERIFICATION
To verify our proposed control scheme for the contact force control, we use the quadruped robot ANYmal C in the physics engine RaiSim [17] to conduct a task, that is, using its front left leg to exerting desired contact force to the ground while its other three legs support the free-floating torso to track a constant pose (i.e., x = y = 0 m and z = 0.57 m for position, and roll = pitch = yaw = 0 rad for orientation). This task aims to imitate an underactuated quadrupedal robot pressing an object by applying a desired force at the contact point while keeping standing. Specifically, we design two reference force profiles: sinewave and step force, for performance verification. For the sinewave force, we set F x = 30 · sin(0.2t) N , F y = 20 · sin(t) N and F z = 140 − 50 · sin(2t) N with different frequency and magnitude. For the step force, we set F x and F y always to 0 N , and F z starts from 100 N , jumps to 130 N , then to 160 N and back to 130 N , and finalizes at 100 N . These force reference profiles are assumed to be feasible and are also used to imitate the commands from a user.
We compare the force control performance of three controllers labeled as: • proposed: Our proposed control scheme (17a) -(26b). • HOWSM: Hierarchical optimization structure (17a) and (26a), but without using the selection matrices design to decouple the force and motion task (i.e., replacing B m in (17a) and B f in (26a) by B). • PIDCWCU: Projected inverse dynamics contact wrench control (14) for underactuated robots [7]. To be fair, the same control gains K p = 2000 · I 6 , K d = 100 · I 6 are used for all cases. Figs. 3 and 4 illustrate the simulation results of sinewave and step force tracking, respectively. We observe that our proposed controller demonstrated more accurate contact force control performance in any direction, although slight tracking errors exist. It reveals that our controller is a reactive controller that has a fast response to user-defined contact force without using any force planning. The force error in our method is mainly induced by two reasons: 1) we formulate the constraint force tracking as a cost function in the constraint space, and therefore the constraint force control could be traded-off when the inequality constraints must be enforced; 2) We do not use the Jacobians at the exact contact points to construct the constraint Jacobian J c , as it is unfeasible in hardware experiment. To simulate as much as possible the situation in hardware, we instead use the Jacobians in the centers of the contact feet for J c , and thus it causes the force error. Moreover, our controller induces minimal base motion, as shown in (b) of Fig. 3 and 4.
The purpose of comparing the force control performance with HOWSM is to emphasize that using two selection matrices in our controller is the key to decouple the force and motion task towards the exact contact force control. Without using them, the motion and force control task are still highly coupled because the contact foot used for the force control will also contribute to the motion task via the original selection matrix B. For PIDCWCU, the comparison results show that this controller cannot approach the exact contact force control, as the additional term (I − P )τ u that is designed for resolving underactuation would induce a disturbance to the contact force control and thus fail the force tracking task.

V. CONCLUSION AND FUTURE WORK
This paper presents a novel control scheme that aims to approach the exact interaction force control for underactuated quadrupedal systems. Based on PIDC, the constraint forces can be formulated in the function of actuation torques, allowing us to design the desired contact forces. To resolve underactuation, we follow the idea of constrained hierarchical optimization that solves two QP optimization problems in the motion and constraint space sequentially and satisfies the physical constraints at the same time. To decouple the motion and force control task and achieve the exact contact force control to the greatest extent, we propose a strategy of applying two selection matrices to the cost function of the QP design. Combining the hierarchical structure and the strategy, a novel control scheme is proposed. Compared to the constrained hierarchical optimization method without using two selection matrices and the PIDC method for contact force control, our controller performed more precise contact force control since the coupling effect between motion and force control was greatly mitigated, facilitating the exact interaction force control for underactuated quadrupedal systems. In the future, we will implement our algorithm on the hardware, and implement it to other underactuated quadruped systems like quadruped mobile manipulators. Moreover, we will further decouple the motion and contact force control task in an analytical way.