Next Article in Journal
A Lightweight Person Detector for Surveillance Footage Based on YOLOv8n
Previous Article in Journal
Incorporating Multimodal Directional Interpersonal Synchrony into Empathetic Response Generation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Squat Motion of a Humanoid Robot Using Three-Particle Model Predictive Control and Whole-Body Control

by
Hongxiang Chen
1,
Xiuli Zhang
1 and
Mingguo Zhao
2,*
1
School of Mechanical Electrical and Control Engineering, Beijing Jiaotong University, Beijing 100044, China
2
Department of Automation, Tsinghua University, Beijing 100084, China
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(2), 435; https://doi.org/10.3390/s25020435
Submission received: 8 November 2024 / Revised: 8 January 2025 / Accepted: 10 January 2025 / Published: 13 January 2025
(This article belongs to the Section Sensors and Robotics)

Abstract

:
Squatting is a fundamental and crucial movement, often employed as a basic test during robot commissioning, and it plays a significant role in some service industries and in cases when robots perform high-dynamic movements like jumping. Therefore, achieving continuous and precise squatting actions is of great importance for the future development of humanoid robots. In this paper, we apply three-particle model predictive control (TP-MPC) combined with weight-based whole-body control (WBC) to a humanoid robot. In this approach, the arms, legs, and torso are simplified into three particles. TP-MPC is utilized to optimize the rough planning’s reference trajectory, while WBC is employed to follow the optimized trajectory. The algorithm is tested through simulations of a humanoid robot performing continuous squatting motions. It demonstrates the ability to achieve more accurate trajectory tracking compared to using WBC alone and also optimizes the issue of excessive knee torque spikes that occur with WBC alone during squatting. Moreover, the algorithm is less computationally intensive, and it is capable of operating at a frequency of 100 Hz.

1. Introduction

1.1. Background

In recent years, the development of humanoid robots has been accelerating rapidly, and their motion capabilities have improved remarkably. However, due to the complex dynamics and high degrees of freedom inherent in humanoid robots, coupled with external environmental interferences, achieving precise motion control remains a significant challenge. For service robots, like those utilized in warehousing and logistics, the ability to squat is essential and crucial. These robots have to bend down and squat to handle items, using their arms to perform tasks before standing up again. Traditionally, the control algorithms for bipedal robots have relied on optimization-based methods. Some researchers, such as Kajita et al. have employed the linear inverted pendulum (LIP) method to control bipedal robots on rugged terrains [1]. Xiaobin Xiong et al. have combined LIP with a spring-loaded inverted pendulum (SLIP) to achieve 3D walking in underdriven systems on a particular robot [2]. In 2018, Sangbae Kim et al. applied model predictive control algorithms to footed robot control for the first time [3], and they later proposed the classic MPC + WBC control framework [4], which has had a profound impact on the field.

1.2. Motivation

The execution of a squatting motion by a humanoid robot is a complex task that demands intricate whole-body coordination, involving not only the control of the torso’s position and orientation but also the precise positioning of the arms and feet. Moreover, it is crucial to account for the foot force magnitude and adhere to various dynamic constraints. This underscores the complexity of the whole-body control challenge at hand. To address this, we turn to optimization-based whole-body control algorithms.
There are two general approaches to implementing whole-body control algorithms. Hierarchical quadratic programming (HQP) offers a structured hierarchy among tasks, ensuring that tasks are executed without interference. However, this method’s requirement to solve the optimization problem iteratively demands significant computational resources. On the other hand, weighted quadratic programming (WQP) simplifies the process by requiring the optimization problem to be solved only once. Thus, this paper adopts a weight-based quadratic programming approach.
Furthermore, the MPC is often used for trajectory optimization in robot control problems. The study introduces a three-particle model predictive control [5] strategy to humanoid robotics, offering a novel simplification that enhances the accuracy of the control strategy. Conventional MPC approaches often simplify quadrupedal and bipedal robots into a single rigid body model, neglecting the presence of arms and legs, which can be an oversimplification. In contrast, the three-particle model acknowledges the presence of both arms and legs, providing a more nuanced representation. This paper leverages the squatting task as a testbed to explore the merits of the three-particle model, aiming to demonstrate its effectiveness in achieving complex motions with greater accuracy and efficiency. By integrating this approach with whole-body control, we aim to contribute to the advancement of humanoid robot control strategies that are both sophisticated and computationally feasible.

1.3. Related Works

There have already been some researchers conducting related studies in this direction. For instance, Francesco Nori and Yue Hu et al. achieved the squatting movement of a humanoid robot by employing a scaled-down version of the iCub bipedal robot along with multiple objective functions [6]. David B. Grimes et al. utilized probabilistic inference in a Bayesian network to explore the problem of a humanoid robot learning the whole-body movement of a human. Based on the HOAP-2 humanoid robot, they realized a squatting movement and a single-leg balancing movement [7]. Yuki Asano et al. designed a screw-home mechanism and applied it to the skeletonoid robot Kenshiro to accomplish continuous twisting squatting movements [8]. Sang-Ho Hyon et al. put forward an imitation learning framework and applied the proposed method to a four-link robot model, successfully realizing squatting actions [9]. David Galdeano et al. proposed a task-based zero-moment point (ZMP) planning, achieved whole-body planning on the humanoid robot HOAP-3, and carried out static balance experiments and squatting experiments under external thrust [10]. Sean Mason et al. proposed a linear quadratic regulator (LQR) for humanoid robots, making use of linearised whole-robot dynamic and contact constraints, and performed push recovery and squat experiments on the Sarcos humanoid robot [11]. Shuuji Kajita et al. implemented forward downward squatting and backward retracting squatting on the HRP-2Kai humanoid robot [12]. L. Penco et al. proposed a redirection method in the research of humanoid whole-body motion. It is a control framework based on inverse kinematics (IK) and a quadratic programming (QP) optimization solver combined with a remote-controlled iCub robot, and the squatting experiments were conducted on an iCub robot [13]. In 2011, Andrej Gams et al. modeled a real person, collected the joint trajectories of a human during squatting, and processed them for the implementation of a continuous squatting action on a bipedal robot. They used the ZMP method to ensure the stability of the robot, applying the idea of zero-space projection and making maintaining stability during the squatting process a top priority [14]. In 2022, J. Duran-Hernandez et al. used the second-order Super Twisting Sliding Mode Control (STSMC) method to achieve squatting on a low-cost bipedal robot and compared it with the proportional integral derivative (PID) method, proving that the method could achieve better trajectory tracking [15]. In 2009, Sang-Ho H et al. proposed a virtual implementation framework for a torque-controlled humanoid robot with a biological musculoskeletal system by integrating a task-space controller and a joint stiffness controller through a superposition method that tested the feasibility of the algorithm using squatting motion [16]. In 2017, Sang-Ho Hyon et al. designed a hydraulic humanoid robot TaeMu, which performed a squatting movement with a sinusoidal signal for the torso trajectory [17]. In 2016, Dingsheng Luo et al. proposed a solution to the problem of non-smooth overshooting when transforming the tasks performed by the robot, converting the problem to a machine-learning approach. The DARwIn-OP robot provided by webots was used in the simulation for the implementation of the training results, and finally, physical experiments were conducted on a PKU-HR5.1 humanoid robot to verify the feasibility of the method [18]. In 2013, Vincent Bonnet et al. proposed a method for estimating the state of a humanoid robot in the sagittal plane during squatting when the joints of the lower limbs as well as the torso are in motion, and they verified the accuracy of the estimation method using squatting motion on the HOAP-3 robot [19]. In the field of exoskeleton robotics, there is also relevant research on squatting. In 2021, Shuzhen L et al. achieved squatting on a lower-limb rehabilitation robot using a reinforcement learning method with strong robustness and anti-interference ability [20]. In 2018, A. N. Miyadaira et al. analyzed the motion during squat jumping for 3DOF articulated legs and proposed two methods to estimate the joint torque change during jumping to optimize the stability of the robot during landing [21].
I-Feng Lee et al. successfully implemented squatting movements on a single robotic leg, providing valuable insights for the study of humanoid robot dynamics [22]. Professor Zhang Liang’s team employed imitation learning algorithms to conduct a phase-time squatting test on the NAO robot [23]. Professor Chen Jianxin’s team achieved lower-body control on a humanoid robot based on gesture information, enabling the robot to perform tasks such as standing on one foot and squatting [24]. In 2022, Wenhan Cai integrated real-time kinematic programming (RKP) and WBC methods to simulate squatting motion on a bipedal robot [25]. In 2023, Pengcheng Lin proposed a method for joint trajectory planning using elastic primitives to enhance the energy storage effect during the landing phase of squatting. This involved conducting human motion capture experiments, data processing, and validating the method’s effectiveness through simulation experiments [26].

1.4. Contribution

In this paper, we mainly use the three-particle model predictive control algorithm and the whole-body control algorithm to implement the squatting action on a humanoid robot. The three-particle model predictive control algorithm is used for optimizing the rough trajectories, and the whole-body control algorithm achieves the accurate tracking of the trajectory optimized by the model predictive control and handles the corresponding constraints based on the design of the weights. Ultimately, we achieved more accurate trajectory tracking and optimized the phenomenon of large peak knee moments compared to the WBC-only approach. In addition, this model simplification allows the MPC problem to be solved within 5.5 ms per frame, in most cases, which greatly improves the computational efficiency.
The rest of the paper is organized as follows: the second part introduces the three-particle model predictive control and whole body control algorithm, the third part introduces the results and discussion, and the fourth section concludes the paper as well as provides some directions for the future.

2. Methods

2.1. Three-Particle Model Predictive Control

2.1.1. Modeling

As shown in Figure 1, the humanoid robot used in this paper has a mass of 20.5 kg and a total of 19 degrees of freedom. A single arm has 3 degrees of freedom, a single leg has 6 degrees of freedom, and the chest has 1 degree of freedom, all of which are rotary joints. Considering the characteristics of the squatting motion and the requirement for the real-time operation of the algorithm, we simplify the humanoid robot into three particles. Specifically, the two arms, two legs, and the torso are simplified into three particles in a three-dimensional space. The center of mass (CoM) of the torso is calculated from the central trunk position and the chest above; the CoM of the two legs and the two arms is calculated from the vector sum of the positions of the end joints and the hip (shoulder) joints to find the midpoints. The end position information is measured by the sensors in the simulation, and the hip (shoulder) joint position is obtained from the sensors at the torso by adding the respective biases. For example, the CoM of a single leg is given by
p m , l e g = 1 2 p b + l h i p + p f o o t
where p m , l e g denotes the CoM position of a single leg, p b R 3 × 1 denotes the trunk position, l h i p R 3 × 1 denotes hip offset relative to the trunk position, and p f o o t R 3 × 1 denotes the foot position. The CoM of the torso is obtained as follows:
p m , t o r s o = m b 1 p m , b 1 + m b 2 p m , b 2 m b 1 + m b 2
where m b 1 denotes the central trunk mass, m b 2 denotes the chest mass, p m , b 1 denotes the CoM of thr trunk, and p m , b 2 denotes the CoM of the chest.
The final overall simplified CoM is obtained as follows:
p C o M = m l e g p m , l e g + m a r m p m , a r m + m b p m , t o r s o m
where p C o M denotes the CoM position and m = m b + m l e g + m a r m is the overall mass. The positions and velocities of the arm ends, leg ends, and torso are selected as the system’s state variables, with their respective accelerations serving as control inputs to establish the discrete state-space equations as follows:
x k + 1 = A ¯ x k + B ¯ u k
where x k = p b T p l h T p r h T p ˙ b T p ˙ l h T p ˙ r h T T , and it includes the position and velocity of the torso, the end of the left hand, and the end of the right arm. u k = p ¨ b T p ¨ l h T p ¨ r h T T , and it contains the acceleration of the torso, the end of the left hand, and the end of the right arm. A ¯ is the state matrix and B ¯ is the control matrix. In addition, the states of the simplified CoM can be deduced by combining Equations (1)–(3) as follows:
p C o M , k = C x k + D
p ˙ C o M , k = E x k
after the N-step prediction, the compact form of the state equation is as follows:
X = A q p x 0 + B q p U
among them,
A q p = A ¯ A ¯ 2 A ¯ N R 18 N × 18
B q p = B ¯ 0 0 A ¯ B ¯ B ¯ 0 A ¯ N 1 B ¯ B ¯ N 2 B ¯ B ¯ R 18 N × 9 N
x 0 denotes the current state of the system that needs to be acquired each time the MPC problem is computed, and U denotes the optimal control sequence that needs to be computed at the current torque. Correspondingly, the states of the simplified CoM are represented as follows:
P C o M = C ¯ X + D ¯
P ˙ C o M = E ¯ X
Correspondingly,
C ¯ = C C R 3 N × 18 N D ¯ = D D R 3 N × 1 E ¯ = E E R 3 N × 18 N
where the matrices C and E and the vector D are used to calculate the state quantities of the simplified center of mass.

2.1.2. Cost Function

The significance of establishing the cost function is to ensure that the trajectory following error during squatting is as small as possible and the amount of control required is not too large, so the following cost function is established:
J = min U P C o M P C o M r e f Q ¯ + P ˙ C o M P ˙ C o M r e f R ¯ + P ¯ a r m P ¯ a r m r e f S ¯ + U T ¯
The position and velocity tracking terms of the simplified CoM position are P C o M P C o M r e f Q ¯ and P ˙ C o M P ˙ C o M r e f R ¯ , the position and velocity tracking term of the end of the arm is P ¯ a r m P ¯ a r m r e f S ¯ , and the penalty term of the control input U T ¯ is included in Equation (13). In Equation (13), the weight of the CoM position tracking term Q ¯ R 3 N × 3 N , the weight of CoM velocity tracking term R ¯ R 3 N × 3 N , the weight of end-of-arm position and velocity tracking term S ¯ R 12 N × 12 N , and the weight of control penalty term T ¯ R 3 N × 3 N , respectively.
The corresponding weighting factors are shown in Table 1.
Due to the excessive length of the third term, we split it into separate representations for the left and right arms.
The cost function is further converted to a QP form by combining Equations (7) and (13) as follows:
min U 1 2 U T H U + U T g
H = H 1 + H 2 + H 3 + H 4
g = g 1 + g 2 + g 3 + g 4
where H , g denotes the sum of the coefficients of the CoM position and velocity tracking, the arm end position and velocity tracking, and the input penalty term task. For example, H 1 , g 1 , H 2 , g 2 are the task matrices and vectors obtained when deriving the CoM position and velocity following term into the standard QP form.
H 1 = 2 B q p T C T ¯ Q ¯ C ¯ B q p
g 1 = 2 B q p T C T ¯ Q ¯ ( p C o M , p o s r e f + C ¯ A q p x 0 + D ¯ )
H 2 = 2 B q p T E T ¯ R ¯ E ¯ B q p
g 2 = 2 B q p T E T ¯ R ¯ ( p C o M , v e l r e f + E ¯ A q p x 0 )
where p C o M , p o s r e f , p C o M , v e l r e f are the reference trajectories of the simplified CoM obtained by rough planning.
This is finally solved using the qpOASES library, and the first frame of data obtained from the optimization solution is used as the reference input for the WBC, The overall control block diagram is shown in Figure 2.

2.2. Whole-Body Control

2.2.1. Modeling

The humanoid robot is generally modeled as a full-dynamics model containing a floating base when the whole-body control method is used, in which case, the generalized joints of the robot are expressed as follows:
q = q f q j R n q
where q f R 6 is used to describe the position and attitude of the robot torso and the attitude is generally expressed in Euler angles or quaternion; q j R n j is used to describe the joint angles of all real joints, and
n q = n j + 6
The full dynamic equation is expressed as follows:
M ( q ) q ¨ + h ( q , q ˙ ) = 0 6 × 1 τ j + J c T ( q ) ω c
where q ˙ is the generalized joint velocity; q ¨ is the generalized joint acceleration; M ( q ) R n j × n j is the mass inertia matrix dependent on the q , h ( q , q ˙ ) and contains the Coriolis, centrifugal, and gravity terms; τ j is the real joint driving torque; J c ( q ) R 12 × n q is the contact Jacobian matrix; and ω c = ω c 1 T ω c 2 T T represents the contact wrenches, where ω c 1 T = f 1 T τ 1 T T R 6 × 1 denotes the end-foot force and torque of the contact foot.

2.2.2. Whole-Body Control Formulation

There are various forms of implementing the full-body control algorithms, and building a quadratic programming problem containing weights is one of them. Its standard form is as follows:
arg min χ i = 1 n t a s k W i A i χ b i 2 2 s . t . l b k C k χ u b k ( k = 1 , 2 , . . . k c o n s t r a i n t )
where A i B i denotes the task matrix and task vector of the corresponding task; W i is the weight of the corresponding task; χ = q ¨ T ω T T is the optimization variable, including the generalized joint acceleration and wrenches; C k is the constraint matrix of the corresponding constraint; and l b k u b k is the lower limit and upper limit of the corresponding constraint. Finally, it is converted into an optimization problem to solve the optimization variables, and the joint torque τ j can be obtained by combining it with the full dynamics Equation (17). The robot needs to coordinate the whole-body joint movement to achieve the squatting action, so the following subtasks and constraints are set as shown in the Table 2.
The weighting factors for each task are shown in Table 3.

2.2.3. Tasks

Torso Trajectory Tracking Task

It is important to achieve the accurate trajectory tracking of the torso during the squat, so the torso task was set up as follows:
I 6 × 6 0 6 × ( n j + 12 ) χ p ¨ t o r s o d e s Θ t o r s o d e s ¨
where χ is the variable to be optimized; I 6 × 6 is a unit diagonal matrix used to select the optimization variables required for this task; and p ¨ t o r s o d e s , Θ ¨ t o r s o d e s are the desired torso linear acceleration and angular acceleration, obtained from the PD controller as follows:
x ¨ t o r s o c m d = x ¨ t o r s o d e s + k p x t o r s o d e s x t o r s o f b + k d x ˙ t o r s o d e s x ˙ t o r s o f b
Here x t o r s o d e s , x ˙ t o r s o d e s , x ¨ t o r s o d e s are obtained by TP-MPC.

Arm Trajectory Tracking Task

The arms need to follow the torso during the squat, so we set up the arm task as follows:
J h a n d ( q f b ) 0 6 × 12 χ x ¨ h a n d d e s J ˙ h a n d ( q f b ) q ˙ f b
where x ¨ h a n d contains p ¨ h a n d d e s Θ ¨ h a n d d e s , which represent the desired linear and angular accelerations of the arm; q f b and q ˙ f b are the generalized joint position and velocity feedback, respectively; and J h a n d R 6 × n q is the arm Jacobian matrix.

Foot Trajectory Tracking Task

The feet need to remain stationary relative to the ground during the squat, so we set up the feet task as follows:
J f o o t ( q f b ) 0 6 × 12 χ x ¨ f o o t d e s J ˙ f o o t ( q f b ) q ˙ f b
where x ¨ f o o t contains p ¨ f o o t d e s Θ ¨ f o o t d e s , which are the desired linear and angular acceleration of the foot; q f b and q ˙ f b are the generalized joint position and velocity feedback, respectively; and J f o o t R 6 × n q is the foot Jacobian matrix.

Chest Trajectory Tracking Task

The squatting process does not require the chest joint, so this joint is fixed to the zero position and the chest joint task is set as follows:
0 1 × 6 I 0 1 × 30 χ 0
The chest joint expectation is set to zero in this task.

Wrench Task

To ensure that contact forces are not excessive during the squat, the task is formulated as follows:
0 12 × ( n j + 6 ) I 12 × 12 χ 0 12 × 1

2.2.4. Constraints

In the process of solving the optimization problem, it is necessary to set the appropriate constraints; otherwise, the results will be solved, which cannot be achieved in reality, so the following constraints are set:

Floating Base Dynamics Constraint

In the full dynamics model, we often describe the 6-dimensional motion possessed by the floating base as the result of being driven by a virtual joint containing 6 DoF, so we need to ensure that the actual driving force of these 6 DoF is zero when solving the optimization, and we therefore set this constraint as follows:
S f M q f b S f J f o o t T q f b χ = S f h q f b , q ˙ f b
where S f = I 6 × 6 0 6 × n j is the floating base selection matrix used to select the virtual joints mentioned earlier.

Contact Force Constraint

In order to ensure that the robot foot end does not slip, it should be ensured that the foot end force is within the cone of friction, and also that the foot sole force in the vertical direction should not be too large, so the constraint is formulated as follows:
f x μ f z f y μ f z 0 f z f z max
where μ is the coefficient of friction and f z is the maximum contact force in the z direction. We describe Equation (32) as a form of Equation (24) as follows:
lb f C f χ ub f
The corresponding constraint matrix with upper and lower bounds is denoted as follows:
C f = 0 5 × n q C 1 , f 5 × 3 0 5 × 3 0 5 × 3 0 5 × n q 0 5 × 3 C 2 , f 5 × 3 0 5 × 3
l b f = 0 10 × 1 u b f = 10 × 1
C 1 , f = C 2 , f = 1 0 μ 1 0 μ 0 1 μ 0 1 μ 0 0 1

Joint Torque Constraint

In order to ensure the availability of the joint moments, it is necessary to limit the joint moments obtained from the optimization solution to a certain range. We morph Equation (23) into the form of Equation (24), from which we can obtain the correlation matrix for this constraint as follows:
τ j S j h ( q f b , q ˙ f b ) = S j M ( q f b ) J f o o t T ( q f b ) χ
lb τ C τ ub τ
C τ = S j M ( q f b ) J f o o t T ( q f b )
l b τ = τ min S j h ( q f b , q ˙ f b )
u b τ = τ max S j h ( q f b , q ˙ f b )
where S j = 0 n j × 6 I n j × n j is the joint torque selection matrix used to select the drive joints in the optimized variables. τ max and τ min are the actual maximum and minimum joint torque values.

Joint Velocity Constraint

In order to ensure the effectiveness of the joint rotational speed, it is necessary to limit the joint rotational speed to a certain range. We morph Equation (23) into the form of Equation (24), from which we can obtain the correlation matrix for this constraint as follows:
q ˙ t + Δ t = q ˙ t + Δ t q ¨ t
lb q ˙ j C q ˙ j ub q ˙ j
C q ˙ j = 0 n j × 6 Δ t I n j × n j 0 n j × 12
l b q ˙ j = q ˙ j min q ˙ j f b
u b q ˙ j = q ˙ j max q ˙ j f b

Joint Power Constraint

In order to ensure the long and stable operation of the joint, it is necessary to keep the operating power within the normal range. We morph Equation (23) into the form of Equation (24), from which we can obtain the correlation matrix for this constraint as follows:
τ j S j h ( q f b , q ˙ f b ) = S j M ( q f b ) J f o o t T ( q f b ) χ
lb p C p ub p
C p = d i a g q ˙ f b S j M ( q f b ) J f o o t T ( q f b ) χ
l b P =
u b P = P j max d i a g q ˙ f b S j h ( q f b , q ˙ f b )
where P j max is the joint maximum power.

2.3. Experimental Design for Simulation

The humanoid robot used is shown in Figure 3. The simulation experiments were conducted using the open source simulation software Webots, it is an open source and multi-platform desktop application for simulating robots. It provides a complete development environment to model, program, and simulate robots. The QP problem was solved using the qpOASES library [27], it is an open source C++ library specializing in solving small- and medium-sized convex quadratic programming problems. Favored for its efficient performance and guaranteed numerical stability, qpOASES is especially suited for areas such as robot motion planning, machine learning, and control. The dynamics and kinematics were resolved using the rigid body dynamics library (RBDL), which is a high-performance C++ library for rigid body dynamics modeling. It also includes some important rigid body dynamics algorithms, such as ABA, RNEA, CRBA, etc, which enable efficient operations on joint space inertia matrices [28].
For the determination of the trajectory of the humanoid robot when squatting, we conducted motion capture experiments. We used the Nokov optical 3D motion capture system, which can capture the reflective markers placed on the target to accurately capture the 3-dimensional spatial position. Through advanced algorithms used for processing and computing, the system can get the 3-dimensional spatial coordinates of the reflective markers in different time units of measurement (X, Y, Z); it can also be set up on the target object’s rigid body. The system can also be set up on the rigid body of the target object, and through the professional analysis software it can further process and calculate the data, obtaining the three-dimensional data of the target object such as the precise position and attitude. We obtained the trajectory of the X, Y, and Z directions of the real person when squatting through the motion capture equipment, as shown in Figure 4. Through the motion capture data, it can be observed that the torso not only reciprocates in the z-direction but also has a brief reciprocal displacement in the x-direction, and the trajectory of the torso is similar to the triangular wave in the process of squatting. Moreover, the trajectory is similar to the square wave if there is a short pause in the squatting of the two limiting positions, so we used the periodic triangular and square wave trajectories for the squatting test. In the simulation inspired by the squatting trajectories obtained from human motion capture, we first describe the trajectories in our experiments as square and triangular waves. Then, the trajectory is optimized using the three-particle model predictive control, and the optimized trajectory is given for the whole-body control to follow. In some related studies in the past, researchers primarily used the WBC method alone to realize some functions, such as push-recovery [29]. Therefore, we designed a comparative experiment to track the square and triangular wave trajectories using only the whole-body control method. The trajectory period in all experiments was set to 2 s and the squat height was 0.2 m.

3. Results and Discussion

3.1. Square Wave

Two sets of tests are set up in the simulation, and the reference trajectories are both square wave trajectories as well, as shown in Figure 5. Here, the blue dashed line is the reference trajectory, the red solid line is the trajectory of the squatting motion realized by the WBC-WQP control, and the yellow solid line is the trajectory curve obtained after adding the TP-MPC.
As can be observed in Figure 5, the tracking effect of the WBC-only model has an obvious lag effect and a large tracking error, which makes the tracking effect poor overall. However, the tracking effect finally achieved by adding the TP-MPC is better than that of the WBC-only algorithm for the WBC algorithm, which only considers the current moment. Alternatively, the MPC observes the reference state in the future segment of the time domain and thus optimizes the coarsely planned trajectory into a feasible trajectory that allows WBC to follow the trajectory completely.
Furthermore, during the squatting process, the knee joint plays a crucial role; as shown in Figure 6, it can be observed that a large torque spike occurs when only the WBC algorithm is used, which is extremely bad for joint motors. However, the spikes in the knee joint moments are obviously significantly weakened when the TP-MPC is added. The reason may be that when the reference trajectory is a square wave, there is a step between the position and the velocity, which leads to the existence of obvious spikes in the calculated moments, but when TP-MPC is added, the rough trajectory is optimised to a smoother trajectory, and the final optimised knee moments for tracking the smoother trajectory no longer have large spikes.
The real-time nature of the algorithms also needs to be guaranteed. As shown in Figure 7, the algorithm is able to compute within 5.5 ms in most cases and within 10 ms overall, which has a high computational efficiency. This high computational efficiency may be due to the simplification of the three-particle model used, as mentioned before.
Finally, we calculated the trajectory tracking error in each direction with Equation (52); we calculated the mean square error throughout the simulation. The trajectory tracking errors of the two algorithms when the reference trajectory is a square wave are shown in Table 4.
MSE = 1 N i = 1 N y i y i 2
where N is the total amount of data, y i is the reference value, and y i is the feedback value. From Table 4, it can be observed that the overall tracking error is small, compared to the control framework with TP-MPC + WBC, which is more capable of achieving accurate trajectory tracking.

3.2. Triangle Wave

When the reference trajectory is a triangle wave, the tracking effect is as shown in Figure 8; the period of the reference trajectory is 2 s and the squatting height is 0.2 m, which is consistent with the square wave, and the same phenomenon can be observed from the local zoomed-in figure. Only the WBC realizes the squatting with an obvious lag phenomenon, while being far away from the reference trajectory, and the obvious tracking error contrast can be observed, especially in the y-direction.
As shown in Figure 8, when TP-MPC is added, the trajectory tracking accuracies in the x, y, and z directions are all improved due to the fact that TP-MPC is able to take into account the reference trajectories in the future time domain in advance.
The knee torque when the reference trajectory is a triangular wave is shown in Figure 9, and it can be observed that the phenomenon of large torque peaks has been somewhat reduced, which is also a result of the triangular wave being optimized to be relatively smooth.
When the reference trajectory is a triangular wave, the computational time of the MPC also mostly stays within 5.5 ms. It also shows high computational efficiency, as shown in Figure 10.
Finally, the trajectory tracking errors of the two algorithms when the reference trajectory is a triangle wave are shown in Table 5. From the data, it can be seen that the squatting motion implemented by the TP-MPC + WBC framework has a smaller tracking error compared to the WBC alone.

4. Conclusions

In this paper, the TP-MPC is applied to a humanoid robot and combined with the WBC algorithm to achieve continuous squatting movements. TP-MPC optimizes the rough planning trajectory into a smoother reference path, while WBC strictly follows the optimized reference trajectory. Additionally, comparison experiments were conducted between the combination of TP-MPC and WBC and WBC alone to achieve continuous squatting, using square wave and triangle wave reference trajectories. Both sets of experiments confirmed that the trajectory tracking effect achieved by combining this method (TP-MPC + WBC) was superior to that of WBC alone. The phenomenon of larger spikes in knee torque during squatting, which occurred when only using WBC, was also optimized when the TP-MPC algorithm was included. Furthermore, the algorithm is computationally efficient, with the overall calculation completed within 10 ms. However, TP-MPC has some limitations. The algorithm simplifies the humanoid robot into a particle model and only considers kinematics, which means it cannot handle the robot’s pose information and has poor resistance to external dynamic disturbances. In the future, it may be necessary to continue improving the algorithm and attempt to incorporate dynamics to realize a more optimal control strategy.
Furthermore, reinforcement learning (RL) is gaining increasing popularity in the field of robot control. Consequently, employing RL methods could be considered for achieving squatting movements in humanoid robots and to compare the experimental outcomes with those of traditional control methods, followed by an analysis.

Author Contributions

Conceptualization, H.C.; methodology, H.C.; software, H.C.; validation, H.C.; formal analysis, H.C.; investigation, H.C.; resources, H.C.; data curation, H.C.; writing—original draft preparation, H.C.; writing—review and editing, H.C.; visualization, H.C.; supervision, X.Z.; project administration, M.Z.; funding acquisition, M.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the STI2030-Major Projects 2021ZD0201402 and STI2030-Major Projects 2021ZD0201403.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
LIPLinear inverted pendulum
SLIPSpring-loaded inverted pendulum
HQPHierarchical quadratic programming
WQPWeighted quadratic programming
WBCWhole-body control
IKInverse kinematics
pidProportional integral derivative
RKPReal-time kinematic programming
TP-MPCThree-particle model predictive control
CoMCenter of mass
ZMPZero-moment point
DoFDegrees of freedom
QPQuadratic programming
LQRLinear quadratic regulator
RLReinforcement learning

References

  1. Kajita, S.; Tani, K. Study of dynamic biped locomotion on rugged terrain-derivation and application of the linear inverted pendulum mode. In Proceedings of the 1991 IEEE International Conference on Robotics and Automation, Sacramento, CA, USA, 9–11 April 1991; Volume 1, pp. 1405–1411. [Google Scholar]
  2. Xiong, X.; Ames, A.D. Coupling Reduced Order Models via Feedback Control for 3D Underactuated Bipedal Robotic Walking. In Proceedings of the 2018 IEEE-RAS 18th International Conference on Humanoid Robots (Humanoids), Beijing, China, 6–9 November 2018; Volume 11, pp. 1–9. [Google Scholar]
  3. Di Carlo, J.; Wensing, P.M.; Katz, B.; Bledt, G.; Kim, S. Dynamic Locomotion In The Mit Cheetah 3 Through Convex Model-Predictive Control. In Proceedings of the 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Madrid, Spain, 1–5 October 2018; Volume 10, pp. 1–5. [Google Scholar]
  4. Kim, D.; Di Carlo, J.; Katz, B.; Bledt, G.; Kim, S. Highly Dynamic Quadruped Locomotion via Whole-Body Impulse Control and Model Predictive Control. arXiv 2019, arXiv:1909.06586. [Google Scholar]
  5. Yang, Y.; Shi, J.; Huang, S.; Ge, Y.; Cai, W.; Li, Q.; Chen, X.; Li, X.; Zhao, M. Balanced Standing on One Foot of Biped Robot Based on Three-Particle Model Predictive Control. Biomimetics 2022, 7, 244. [Google Scholar] [CrossRef] [PubMed]
  6. Hu, Y.; Nori, F.; Mombaur, K. Squat motion generation for the humanoid robot iCub with Series Elastic Actuators. In Proceedings of the 2016 6th IEEE International Conference on Biomedical Robotics and Biomechatronics (BioRob), Singapore, 26–29 June 2016; Volume 10, pp. 207–212. [Google Scholar]
  7. Grimes, D.B.; Chalodhorn, R.; Rao, R.P. Dynamic Imitation in a Humanoid Robot through Nonparametric Probabilistic Inference. In Robotics: Science and Systems; MIT Press: Cambridge, MA, USA, 2006. [Google Scholar]
  8. Asano, Y.; Mizoguchi, H.; Kozuki, T.; Motegi, Y.; Urata, J.; Nakanishi, Y.; Okada, K.; Inaba, M. Achievement of twist squat by musculoskeletal humanoid with screw-home mechanism. In Proceedings of the 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, Tokyo, Japan, 3–7 November 2013; pp. 4649–4654. [Google Scholar]
  9. Ariki, Y.; Hyon, S.H.; Morimoto, J. Extraction of primitive representation from captured human movements and measured ground reaction force to generate physically consistent imitated behaviors. Neural Netw. 2013, 40, 32–43. [Google Scholar] [CrossRef] [PubMed]
  10. Galdeano, D.; Chemori, A.; Krut, S.; Fraisse, P. Task-based whole-body control of humanoid robots with ZMP regulation, real-time application to a squat-like motion. In Proceedings of the 2014 IEEE 11th International Multi-Conference on Systems, Signals & Devices (SSD14), Barcelona, Spain, 11–14 February 2014; Volume 10, pp. 1–6. [Google Scholar]
  11. Mason, S.; Righetti, L.; Schaal, S. Full dynamics LQR control of a humanoid robot: An experimental study on balancing and squatting. In Proceedings of the 2014 IEEE-RAS International Conference on Humanoid Robots, Madrid, Spain, 18–20 November 2014; Volume 10, pp. 374–379. [Google Scholar]
  12. Kajita, S.; Sakaguchi, T.; Nakaoka, S.I.; Morisawa, M.; Kaneko, K.; Kanehiro, F. Quick squatting motion generation of a humanoid robot for falling damage reduction. In Proceedings of the 2017 IEEE International Conference on Cyborg and Bionic Systems (CBS), Beijing, China, 17–19 October 2017; Volume 10, pp. 45–49. [Google Scholar]
  13. Penco, L.; Clément, B.; Modugno, V.; Hoffman, E.M.; Nava, G.; Pucci, D.; Tsagarakis, N.G.; Mouret, J.-B.; Ivaldi, S. Robust Real-Time Whole-Body Motion Retargeting from Human to Humanoid. In Proceedings of the 2018 IEEE-RAS 18th International Conference on Humanoid Robots (Humanoids), Beijing, China, 6–9 November 2018; Volume 10, pp. 425–432. [Google Scholar]
  14. Gams, A.; Petrič, T.; Babič, J.; Žlajpah, L.; Ude, A. Constraining Movement Imitation with Reflexive Behavior: Robot Squatting. In Proceedings of the 2011 11th IEEE-RAS International Conference on Humanoid Robots, Bled, Slovenia, 26–28 October 2011; pp. 294–299. [Google Scholar]
  15. Durán-Hernández, J.; Fuentes-Aguilar, R.Q.; Campos-Macías, L.; Carbajal-Espinosa, O. Control Implementation in a Low-cost Designed Biped Robot to Reproduce Squats. In Proceedings of the 2022 10th International Conference on Control, Mechatronics and Automation (ICCMA), Belval, Luxembourg, 9–12 November 2022; pp. 36–41. [Google Scholar]
  16. Hyon, S.H. A Motor Control Strategy with Virtual Musculoskeletal Systems for Compliant Anthropomorphic Robots. IEEE/ASME Trans. Mechatron. 2009, 14, 677–688. [Google Scholar] [CrossRef]
  17. Hyon, S.H.; Suewaka, D.; Torii, Y.; Oku, N. Design and Experimental Evaluation of a Fast Torque-Controlled Hydraulic Humanoid Robot. IEEE/ASME Trans. Mechatron. 2017, 22, 623–634. [Google Scholar] [CrossRef]
  18. Luo, D.; Deng, Y.; Han, X.; Hu, F.; Wu, X. Learning task transition from standing-up to walking for a squatted bipedal humanoid robot. In Proceedings of the 2016 IEEE-RAS 16th International Conference on Humanoid Robots (Humanoids), Cancun, Mexico, 15–17 November 2016. [Google Scholar]
  19. Bonnet, V.; Mazza, C.; Fraisse, P.; Cappozzo, A. Real-time Estimate of Body Kinematics During a Planar Squat Task Using a Single Inertial Measurement Unit. IEEE Trans. Biomed. Eng. 2013, 60, 1920–1926. [Google Scholar] [CrossRef] [PubMed]
  20. Luo, S.; Androwis, G.; Adamovich, S.; Su, H.; Nunez, E.; Zhou, X. Reinforcement Learning and Control of a Lower Extremity Exoskeleton for Squat Assistance. Front. Robot. AI 2021, 8, 702845. [Google Scholar] [CrossRef]
  21. Miyadaira, A.N.; Madrid, M.K.; Garcia, J.C.; Gualda, D.; Delai, A.L. Squat Vertical Jump of a 3DOF Robot Leg over an Inclined Plane: Analysis with Joint Torque Profile Approximation. IEEE Lat. Am. Trans. 2018, 16, 80–87. [Google Scholar] [CrossRef]
  22. Lee, I.F.; Lin, C.I.; Wu, H.C.; Wu, L.C.; Lin, P.C.; Chiang, M.H.; Shih, W.P. Squat and Standing Motion of a Single Robotic Leg Using Pneumatic Artificial Muscles. J. Appl. Sci. Eng. 2015, 18, 363–370. [Google Scholar]
  23. Zhang, L.; Cheng, Z.; Gan, Y.; Zhu, G.; Shen, P.; Song, J. Fast Human Whole Body Motion Imitation Algorithm For Humanoid Robots. In Proceedings of the 2016 IEEE International Conference on Robotics and Biomimetics (ROBIO), Qingdao, China, 3–7 December 2016; Volume 10, pp. 1430–1435. [Google Scholar]
  24. Chen, J.; Wang, G.; Hu, X.; Shen, J. Lower-body control of humanoid robot NAO via Kinect. Multimed. Tools Appl. 2018, 77, 10883–10898. [Google Scholar] [CrossRef]
  25. Cai, W.; Li, Q.; Huang, S.; Zhu, H.; Yang, Y.; Zhao, M. Squat motion of a bipedal robot using real-time kinematic prediction and whole-body control. IET Cyber-Syst. Robot. 2022, 4, 298–312. [Google Scholar] [CrossRef]
  26. Lin, P. Trajectory Planning of a Humanoid One-legged Robot with Tendon Elastic Actuation during Squatting after Landing. In Proceedings of the 2023 9th International Conference on Control, Automation and Robotics (ICCAR), Beijing, China, 21–23 April 2023; pp. 121–129. [Google Scholar]
  27. Ferreau, H.J.; Kirches, C.; Potschka, A.; Bock, H.G.; Diehl, M. Qpoases: A parametric active-set algorithm for quadratic programming. Math. Program. Comput. 2014, 6, 327–363. [Google Scholar] [CrossRef]
  28. Felis, M.L. Rbdl: An efficient rigid-body dynamics library using recursive algorithms. Auton. Robot. 2017, 41, 495–511. [Google Scholar] [CrossRef]
  29. Xie, Y.; Wang, J.; Dong, H.; Ren, X.; Huang, L.; Zhao, M. Dynamic Balancing of Humanoid Robot with Proprioceptive Actuation: Systematic Design of Algorithm, Software, and Hardware. Micromachines 2022, 13, 1458. [Google Scholar] [CrossRef]
Figure 1. The three-particle model of humanoid robots.
Figure 1. The three-particle model of humanoid robots.
Sensors 25 00435 g001
Figure 2. The control framework for the squatting motion of a humanoid robot based on TP-MPC + WBC.
Figure 2. The control framework for the squatting motion of a humanoid robot based on TP-MPC + WBC.
Sensors 25 00435 g002
Figure 3. Modeling of the humanoid robot.
Figure 3. Modeling of the humanoid robot.
Sensors 25 00435 g003
Figure 4. Trajectories of motion capture during human squatting exercise. Here, (ac) represent the trajectories in the x, y, and z directions, respectively.
Figure 4. Trajectories of motion capture during human squatting exercise. Here, (ac) represent the trajectories in the x, y, and z directions, respectively.
Sensors 25 00435 g004
Figure 5. Trajectory tracking of a humanoid robot squatting motion when the reference trajectory is a square wave. Here, (ac) represent the trajectories in the x, y, and z directions, respectively.
Figure 5. Trajectory tracking of a humanoid robot squatting motion when the reference trajectory is a square wave. Here, (ac) represent the trajectories in the x, y, and z directions, respectively.
Sensors 25 00435 g005
Figure 6. The knee torque solved by QP in WBC.
Figure 6. The knee torque solved by QP in WBC.
Sensors 25 00435 g006
Figure 7. Time taken in TP-MPC with a square wave trajectory.
Figure 7. Time taken in TP-MPC with a square wave trajectory.
Sensors 25 00435 g007
Figure 8. Trajectory tracking of a humanoid robot squatting motion when the reference trajectory is a triangle wave. Here, (ac) represent the trajectories in the x, y, and z directions, respectively.
Figure 8. Trajectory tracking of a humanoid robot squatting motion when the reference trajectory is a triangle wave. Here, (ac) represent the trajectories in the x, y, and z directions, respectively.
Sensors 25 00435 g008
Figure 9. The knee torque solved by QP in WBC.
Figure 9. The knee torque solved by QP in WBC.
Sensors 25 00435 g009
Figure 10. Time taken in TP-MPC with a triangle wave trajectory.
Figure 10. Time taken in TP-MPC with a triangle wave trajectory.
Sensors 25 00435 g010
Table 1. Weight matrix for each term in TP-MPC.
Table 1. Weight matrix for each term in TP-MPC.
Weight TermWeight Matrix
W C o M p o s diag( 7.5 × 10 2 , 1.5 × 10 6 , 3.2 × 10 2 )
W C o M v e l diag(7.0, 1.0 × 10 1 , 2.5)
W l e f t a r m diag( 1.0 × 10 3 , 1.0 × 10 1 , 1.0 × 10 2 , 1.0 × 10 3 , 1.0 × 10 1 , 1.0 × 10 2 )
W r i g h t a r m diag(1.0, 1.0 × 10 1 , 2.5, 1.0, 1.0 × 10 1 , 2.5)
W u diag( 1.0 × 10 3 , 1.0, 1.0 × 10 5 , 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
Table 2. Tasks, Constraints for squat motion.
Table 2. Tasks, Constraints for squat motion.
TasksConstraints
Torso trajectory tracking taskFloating-base dynamic
Arm trajectory tracking taskFriction cone
Feet trajectory tracking taskJoint torque
Wrench taskJoint velocity
Chest joint immobilization taskJoint power
Table 3. Weight matrix for each subtask in WBC.
Table 3. Weight matrix for each subtask in WBC.
Weight TermWeight Matrix
W t o r s o diag(1750, 450, 300, 70, 150, 50)
W a r m diag( 300, 300, 300, 200, 200, 200)
W f e e t diag(900, 900, 900, 190, 140, 150)
W w r e n c h diag(1, 1, 1, 2, 2, 2)
W c h e s t j o i n t diag(70)
Table 4. Tracking error at square wave.
Table 4. Tracking error at square wave.
ItemTP-MPC + WBCWBC
Torso X Pos ( m 2 · 10 5 )0.984.6
Torso Y Pos ( m 2 · 10 7 )0.464.5
Torso Z Pos ( m 2 · 10 3 )1.15.8
Table 5. Tracking error with a triangle wave trajectory.
Table 5. Tracking error with a triangle wave trajectory.
ItemTP-MPC + WBCWBC
Torso X Pos ( m 2 · 10 6 )1.13.7
Torso Y Pos ( m 2 · 10 7 )0.16.2
Torso Z Pos ( m 2 · 10 4 )1.23.2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chen, H.; Zhang, X.; Zhao, M. Squat Motion of a Humanoid Robot Using Three-Particle Model Predictive Control and Whole-Body Control. Sensors 2025, 25, 435. https://doi.org/10.3390/s25020435

AMA Style

Chen H, Zhang X, Zhao M. Squat Motion of a Humanoid Robot Using Three-Particle Model Predictive Control and Whole-Body Control. Sensors. 2025; 25(2):435. https://doi.org/10.3390/s25020435

Chicago/Turabian Style

Chen, Hongxiang, Xiuli Zhang, and Mingguo Zhao. 2025. "Squat Motion of a Humanoid Robot Using Three-Particle Model Predictive Control and Whole-Body Control" Sensors 25, no. 2: 435. https://doi.org/10.3390/s25020435

APA Style

Chen, H., Zhang, X., & Zhao, M. (2025). Squat Motion of a Humanoid Robot Using Three-Particle Model Predictive Control and Whole-Body Control. Sensors, 25(2), 435. https://doi.org/10.3390/s25020435

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop