Simulation of Upward Jump Control for One-Legged Robot Based on QP Optimization

An optimization framework for upward jumping motion based on quadratic programming (QP) is proposed in this paper, which can simultaneously consider constraints such as the zero moment point (ZMP), limitation of angular accelerations, and anti-slippage. Our approach comprises two parts: the trajectory generation and real-time control. In the trajectory generation for the launch phase, we discretize the continuous trajectories and assume that the accelerations between the two sampling intervals are constant and transcribe the problem into a nonlinear optimization problem. In the real-time control of the stance phase, the over-constrained control objectives such as the tracking of the center of moment (CoM), angle, and angular momentum, and constraints such as the anti-slippage, ZMP, and limitation of joint acceleration are unified within a framework based on QP optimization. Input angles of the actuated joints are thus obtained through a simple iteration. The simulation result reveals that a successful upward jump to a height of 16.4 cm was achieved, which confirms that the controller fully satisfies all constraints and achieves the control objectives.


Introduction
Jumping enables more flexibility and stronger terrain adaptability for robots in unstructured terrain. Therefore, jumping motion is an important athletic ability in humanoid technology.
To improve a robot's jumping ability, Raibert and et al. designed a very innovative controller in the 1980s and realized the hopping motion of a hydraulic robot [1,2]. An existing legged robot can adjust the footing point by adjusting the step length and achieve jumping motion on flat ground [3]. Poulakakis and Grizzle developed a two-level hybrid controller that can be used on an spring-loaded inverted pendulum and induce a provably stable gait on an spring-loaded inverted pendulum [4]. Based on a point-foot robot with elastic legs and compliant hip joints, Hyon proposed a controller that does not require robot dynamics or any pre-planned trajectories, and used precise nonlinear dynamics to realize the robot's continuous jump [5]. Haldane analyzed the ability of several arboreal mammals and robots, constructed a jumping robot using a leg mechanism that enhances the power modulation, achieved 78% of Gallago's vertical jumping agility, and demonstrated the jumping ability of the constructed robot through experiments [6]. Yim achieved accurate and reliable leaping and landing on a narrow foot with the small one-legged jumping robot Salto-1P [7]. The above-mentioned robots have very light-weight legs, the torso of the robot accounts for the major proportion of the total mass and the torso mass of the robot is concentrated. Because these robots have point foot or negligible foot in size, these approaches cannot include constraints, such as stability, non-slippage, and limitation of angular acceleration in the launch or landing phase. Therefore, the robots in [1][2][3][4][5][6][7] cannot satisfy the requirements of humanoid robots' jumping motion.
To investigate the jump motion of robots with the mass distribution of human legs, Nunez proposed a simplified mathematical model of a humanoid robot and applied a simple control scheme based on the sliding modes to achieve jumping motion [8]. Aoustin decomposed the jumping process into the launch phase, flight phase, and landing phase, derived the mathematical model for a one-legged robot without a foot [9] and with a massless foot [10], and applied torques to the actuated joints to keep the center of moment (CoM) of the mechanism always placed on the same vertical line. Geyer [11], Tamaddoni [12], and Xiong [13] simplified the jumping motion of the robot as a spring mass model and achieved the jumping motion of the robot. However, none of the above-mentioned approaches considered the stability and angular moment of the robot during the jump.
To theoretically solve the stability of the jumping robot, Barkan completed a jump simulation and experiment for a robot using the online trajectory generation method based on the Eulerian Zero Moment Point (ZMP) Resolution. The undesired torso angle fluctuation was greatly reduced without forcing the angular moment to be zero [14][15][16]. Kajita conducted a ZMP-based running pattern generation simulation at 3 km/h and an experiment on one-time hopping motion with both legs [17]. Barkan and Kajita prevented the robot from falling down by performing ZMP tracking for the desired trajectories instead of only constraining the ZMP inside the support polygon, but their algorithm has poor scalability and compatibility. This means that it is difficult to add various constraints, which should have been considered but were ignored in this scheme, such as the anti-slippage and limitation of the angle and angular accelerations, or add other tasks such as joint tracking. In [18][19][20], offline nonlinear optimization methods were used to generate the robot jumping trajectories and perform experiments on the robot, but it was difficult to use the controller on the robot in real time.
In jumping motion, stability is a prerequisite. The control of angular momentum, anti-slippage, and limitation of angular acceleration are also very important. Although existing studies have considered some of the above-mentioned problems, few studies have addressed all of them under a single framework. With consideration to the abovementioned problems, a framework based on quadratic programming (QP) is proposed in this paper to achieve vertical jump motion for a robot. The main contributions of this study are as follows: (1) A framework based on QP optimization for solving the vertical jump problem is proposed and successfully unifies the hard constraints and over-constrained goals in the jumping process. (2) The restriction of ZMP instead of tracking, non-slippage, limitation of angular acceleration, are added to the optimization framework as hard constraints.
The simplified simulation model and main scheme of jumping are presented in Section 2. The preparation of the upward jump motion is introduced in Section 3. The real-time control of the jump and the results are disscussed in Sections 4 and 5, respectively, followed by the discussion and conclusion.

Simplified Jump Model
In the design and manufacturing process of humanoid robots, the robots are generally arranged symmetrically in the sagittal plane. Hence, the first simplification for the robot is that the movement, external force, and torque on both sides of the robot are exactly the same. Although humanoid robots can possess more than 30 actuated joints, similar to humans, this study only considered the robot leg joints. Hence, the second simplification is that only the hip, knee, and ankle joints of the robot can move while the other joints are fixed. The two above-mentioned simplifications allowed us to establish the three-link robot presented in Figure 1 as our jump model.  As shown in Figure 1, in practical applications, the torso of the robot was equipped with an inertial measurement unit (IMU) and accelerometer used in the simulation to measure the absolute position and posture of the robot after the foot leaves the ground. In the ankle joint, six dimensional force torque (F-T) sensors are implemented to detect the forces and torques applied to the robot. The robot consists of three links (shrunk, thigh, and torso). In the stance phase, the robot possesses three actuated joints at the ankle, knee, and hip joint, which are denoted as θ 1 , θ 2 , and θ 3 , respectively. The absolute pitch and positions of the frame attached to the ankle joint are denoted as θ ab , x f , and y f , respectively. Although θ ab and θ 1 can be considered as identical in the stance phase, they are not necessarily equal in the flight phase. Additionally, x com and y com represent the CoM's horizontal and vertical position in global coordinates.
Using the above notation, we define Θ = [θ 1 , θ 2 , θ 2 ]. By applying the Newton-Euler method, the dynamic equation of the robot in the stance phase can be obtained as follows: where M ∈ R 3×3 is the inertial matrix, V ∈ R 3 is the centripetal and Coriolis vector, G ∈ R 3 is the gravity vector, and τ ∈ R 3 is the torque vector.
In the stance phase, it is assumed that the foot is always in contact with the ground and will not slide off, the robot possesses three degrees of freedom (DoF) and three actuated joints which are placed at respectively, the ankle, the knee and the hip joint, so it is fully actuated. During the flight phase, the robot possesses five DoFs and only two actuated joints, i.e., the knee and hip joint, which means that the robot is underactuated and is subjected to some restrictions, viz. two holonomic constraints resulting from the fact that CoM tracks a parabolic trajectory, and one non-holonomic constraint resulting from the angular momentum conservation.
The robot's mass and inertia and the length of the ith link are denoted as m i , I i c , and l i , respectively. The distance from CoM of each link of the robot to the proximal joint coordinate system is denoted as l ci . The inertial parameters of the robot used in the simulation are listed in Table 1.

Main Scheme of Jumping
The entire jumping process can be divided into three phases in chronological order, namely, the launch phase, flight phase, and landing phase [21]. The launch phase and landing phase can be merged into the stance phase because the foot is always in contact with the ground. As shown in Figure 2, the jumping motion of the robot consists of two parts: the first part is the preparation of the upward jump motion, which is divided into the offline trajectory generation in the launch phase and online trajectory generation in the flight phase and landing phase. The second part is the real-time control of jumping motion, which consists of flight phase control and stance phase control.

Main Scheme of Jumping
The entire jumping process can be divided into three phases in chronological order, namely, the launch phase, flight phase, and landing phase [21]. The launch phase and landing phase can be merged into the stance phase because the foot is always in contact with the ground. As shown in Figure 2, the jumping motion of the robot consists of two parts: the first part is the preparation of the upward jump motion, which is divided into the offline trajectory generation in the launch phase and online trajectory generation in the flight phase and landing phase. The second part is the real-time control of jumping motion, which consists of flight phase control and stance phase control. In the offline trajectory nonlinear optimization, the angular accelerations of the actuated joint are considered to be constant at each sampling interval (4 ms) [22,23]. Therefore, we selected the joints' accelerations as the state vector. If the accelerations and torques of the joints' reference trajectories are too large and exceed the capacity of the saturate torques of motors, it will be difficult to control the robot to track the reference trajectory. Therefore, we need to consider the indispensable constraints, such as the maximum accelerations and maximum torques. In order to minimize the integration of the joints' accelerations and torques and avoid high-frequency oscillations, we penalized accelerations, torques and changes in torque respectively. So the launch problem can be described as a standard nonlinear optimization problem. By using a standard nonlinear optimization solver, the desired trajectories of the actuated joints can be obtained and the CoM can be calculated. To ensure the continuity of the actuated joint trajectory and the real-time calculation in the begining of the flight phase and landing phase, the trajectories are generated online and represented by cubic polynomial interpolation.
In the real-time control of the stance phase, the jumping motion of the robot can be simplified as the jumping of CoM, so the jumping goal needs to track the desired trajectory of CoM in x-axis direction and the y-axis direction. It is difficult to control the angular momentum of the robot respect to CoM to zero when the robot's foot leaves the ground, the jumping goal needs to limit the angular momentum within a smaller range. To avoid In the offline trajectory nonlinear optimization, the angular accelerations of the actuated joint are considered to be constant at each sampling interval (4 ms) [22,23]. Therefore, we selected the joints' accelerations as the state vector. If the accelerations and torques of the joints' reference trajectories are too large and exceed the capacity of the saturate torques of motors, it will be difficult to control the robot to track the reference trajectory. Therefore, we need to consider the indispensable constraints, such as the maximum accelerations and maximum torques. In order to minimize the integration of the joints' accelerations and torques and avoid high-frequency oscillations, we penalized accelerations, torques and changes in torque respectively. So the launch problem can be described as a standard nonlinear optimization problem. By using a standard nonlinear optimization solver, the desired trajectories of the actuated joints can be obtained and the CoM can be calculated. To ensure the continuity of the actuated joint trajectory and the real-time calculation in the begining of the flight phase and landing phase, the trajectories are generated online and represented by cubic polynomial interpolation.
In the real-time control of the stance phase, the jumping motion of the robot can be simplified as the jumping of CoM, so the jumping goal needs to track the desired trajectory of CoM in x-axis direction and the y-axis direction. It is difficult to control the angular momentum of the robot respect to CoM to zero when the robot's foot leaves the ground, the jumping goal needs to limit the angular momentum within a smaller range. To avoid the robot in undesirable configuration and high-frequency oscillations, the jumping goal must penalize the joints' deviation from the desired trajectories and changes in joints' accelerations, respectively. There are 4 control goals but only 3 control variables, i.e., the actuated joints' accelerations, which leads us to unify this over-constrained jumping problem into a framework based on QP optimization with different weights and many constraints. We divided the control problem into Cartesian space and joint space. In Cartesian space, CoM tracking and angular momentum tracking are used as the task goal. Instead of implementing ZMP tracking for the robot, the ZMP is limited within the support polygon of the foot to prevent the robot from tipping over, which is used as a constraint. Additionally, the contact force is exerted within the friction cone to prevent slippage and is used as an additional constraint. In the joint space, joint tracking and the prevention of the joints' high frequency oscillation are used as the task goals, while the joint accelerations within the limitation range are used as constraints. The task goals consist of nine equations and the robot has only three actuated joints, that is, three unknown variables, which is obviously an over-constrained and occasionally conflicting problem. To achieve a real-time solution in each sampling interval (4 ms), we were inspired by the solution method for the robot's walking pattern in [24][25][26] and unified the indispensable constraints and overconstrained goals into a framework based on QP optimization with different weights in front of each objective to embody the priority of the task goals. Therefore, the actuated angular acceleration in each sampling interval can be estimated and the input angles of the actuated joints can then be obtained through a simple iterative process. In the real-time control of the flight phase, we only execute the planned angle of the actuated joints.

Preparation of Upward Jump Motion
The preparation of the upward jump motion comprises three parts: the launch phase, flight phase, and landing phase. The trajectory optimization in the launch phase is transcribed into a nonlinear optimization problem. We can specify the joints' positions and easily solve the joints' velocities on the basis of the conservation of angular momentum and linear momentum at the end of the flight phase. Joints' positions and velocities at the end of the landing phase can be specified. Additionally, the positions and velocities of the joints can be obtained from the sampled joint data at the initial moments of the flight phase and the landing phase. We have obtained the position and velocity of joints at the initial and final moments in the flight and landing phase, and joints' positions and velocities at intermediate time are unknown, so the trajectories in the flight and landing phase can be obtained using a polynomial instead of spline interpolation and Bessel interpolation. The first and quadratic polynomials are not sufficiently smooth, and the calculation of high-order polynomials is not easy and quick enough to implement on computer online. The cubic polynomial is smooth enough and quick to calculate online in real time, so the cubic polynomial was chosen.

Trajectory Planning in Launch Phase
We assumed that the acceleration of each joint between the two sampling intervals is approximately constant and selected the joint accelerations as the state vector. If the initial angle and velocity of the joint are known and the joint acceleration is solved, the angle and velocity of the actuated joints at each sampling time can be iteratively derived using the solved accelerations, initial given angle, and velocity; e.g., the angle and velocity at the (i + 1)th sampling time can be recursively obtained from the position, velocity, and solved acceleration at the ith sampling time, as follows: Here, θ i denote the angle, velocity, and acceleration of the joint at the K th sampling time, and ∆ t is the sampling time equal to 4 ms in our calculations.

Decision Vector
The decision vector is defined as follows: , k indicates the k th discretized time interval, and N is the number of time intervals.

Constraints in Launch Phase
(1) Initial constraints in launch phase The initial restrictions in the joint space of the launch phase are characterized by the following relationships: where Θ 0 ∈ R 3×1 and . Θ 0 ∈ R 3×1 are the initial angle and velocity vector; t launch initial is the initial time in the launch phase.
(2) Terminal constraint Because this study focused on the vertical jump, the horizontal CoM component in the terminal launch phase was formulated as follows: where, x com , .
x com , and ..
x com denote the position, velocity, and acceleration of the horizontal CoM component; t launch f inal is the terminal time of the launch phase. After the foot of the robot leaves the ground, no external force acts on the robot except gravity and the CoM tracks a ballistic parabola trajectory, which means that the vertical force acting on the robot only needs to overcome gravity. Therefore, the sign of switching from the launch phase to the flight phase is the vertical acceleration component being equal to the acceleration caused by gravity. Because the vertical position and velocity of the CoM at the end of launch phase determines the shape of the ballistic parabola of the CoM in the flight phase, the terminal constraints in the vertical component are expressed as follows: where y com , . y com , and .. If the foot leaves the ground, the robot system conserves the angular momentum relative to the CoM. Thus, successful landing becomes difficult when the angular momentum of the robot is very large, and a good course of action is to keep the angular momentum L CoM at zero when the robot foot leaves the ground, as follows: (3) Constraints of horizontal CoM position Because this study focused on upward jumping, the CoM position does not change in the horizontal direction, and the following relationships hold: (4) Boundary constraints for joints To better perform the practical jumping of the robot, the joint cannot exceed the angle, velocity, and acceleration limits, and the linear inequality constraints should be as follows: where, Θ min ∈ R 3 and Θ max ∈ R 3 represent the lower and upper angle boundary, respectively; . Θ min ∈ R 3 and . Θ max ∈ R 3 represent the lower and upper joint velocity boundary, respectively; .. Θ min ∈ R 3 and .. Θ max ∈ R 3 denote the lower and upper joint acceleration boundary, respectively.

(5) Ground reaction force constraints
Throughout the launch phase, the vertical force f Y acting on the robot is always vertical to the ground, and the horizontal force f X is always opposite to the direction of motion and parallel to the ground, as follows: where M t is the total mass of the robot. From Equation (8), we can get the horizontal force f X = 0 in the whole launch phase.
To ensure that the foot will not tip over and cause the robot to fall down, the ZMP should be kept inside the support polygon of the foot, which can be expressed as follows: To ensure that the foot does not slip and stays firmly on the ground, the horizontal force should not exceed the friction and cause the robot to slip, as follows: where u s is the static friction coefficient. Because of f X = 0, Equation (12) can always be satisfied in the launch phase. The maximum amplitude of the contact force must not exceed the maximum value f max to avoid damaging the mechanical structure of the robot.

(6) Torque constraints
With regard to the capacity of the motor and gearbox, it is meaningful to limit the output torques of the robot's joints; therefore, the following torque constraints are imposed: where τ min ∈ R 3 and τ max ∈ R 3 are the lower and upper boundary of the torque vector, respectively.

(7) Changes in vertical position
Similar to the launch process of a human, the robot should continuously expand its body to increase the CoM position throughout the launch phase. Therefore, the vertical position of the CoM in each sampling time is higher than the previous one, as follows: where, y com , and y com denote the vertical position of the CoM in the k th and (k + 1) th discretized time interval.

Cost Function
To minimize the total joint accelerations, the acceleration is penalized as follows: The torques are penalized as follows: Torque changes are penalized to avoid high frequency oscillations, as follows:

Nonlinear Optimization Problem
With consideration to the difference in priority, different weighting factors are added in front of each penalty. Therefore, the nonlinear optimization problem can be formulated as follows: The trajectory planning parameters are summarized in Tables 2 and 3.  As shown in Figure 3, from the beginning to the end of the launch phase, the ankle, knee, and hip of the robot begin to accelerate and push the CoM to increase until the robot's As shown in Figure 3, from the beginning to the end of the launch phase, the ankle, knee, and hip of the robot begin to accelerate and push the CoM to increase until the robot's vertical component of acceleration is completely capable of overcoming gravity under various constraints, which is intuitively satisfactory for achieving human-like take-off motion. The ZMP is always inside the support polygon and the actuated joints always remain within the range of hardware capabilities.

Trajectory Planning in Flight Phase
When the robot's foot leaves the ground in the launch phase, we can obtain the joint position When the robot touches the ground, we assume that the robot lands successfully and there is no slippage between the foot and the ground. Therefore, we can specify the angle vector f li g h t f in a l Θ with the torso perpendicular to the ground, and thereby the following relationship holds.
The robot's angular momentum is conserved during the entire flight phase; therefore, the following equation holds: Because the torso is selected to be perpendicular to the ground, the velocity of the three actuated joints must satisfy the following equation:

Trajectory Planning in Flight Phase
When the robot's foot leaves the ground in the launch phase, we can obtain the y launch com→ f inal , and angular momentum L launch f inal with respect to the CoM. When the robot touches the ground, we assume that the robot lands successfully and there is no slippage between the foot and the ground. Therefore, we can specify the angle vector Θ f light f inal with the torso perpendicular to the ground, and thereby the following relationship holds.
The robot's angular momentum is conserved during the entire flight phase; therefore, the following equation holds: Because the torso is selected to be perpendicular to the ground, the velocity of the three actuated joints must satisfy the following equation: .
During the entire flight phase, the horizontal component of the CoM is not affected by any external force; therefore, the horizontal speed of the CoM remains constant, as follows: .
x launch com→ f inal t = t f light f inal (23) The angular velocity at the moment of landing can be easily solved according to Equations (20)- (23). To solve the actuated joint trajectories in real-time, θ 2 and θ 3 can be expressed by a cubic polynomial function.
As shown in Figure 4, during the initial phase of the flight, the two actuated joints continue to stretch owing to the large velocity caused by the launch phase. Then, to ensure that the robot is not in a singular configuration and prevent the impact force from causing great damage to the robot's mechanical structure at touchdown, the actuated joints start to accelerate in the reverse direction and slowly move to the specified position.
The angular velocity at the moment of landing can be easily solved according to Equations (20)- (23). To solve the actuated joint trajectories in real-time, 2 θ and 3 θ can be expressed by a cubic polynomial function. As shown in Figure 4, during the initial phase of the flight, the two actuated joints continue to stretch owing to the large velocity caused by the launch phase. Then, to ensure that the robot is not in a singular configuration and prevent the impact force from causing great damage to the robot's mechanical structure at touchdown, the actuated joints start to accelerate in the reverse direction and slowly move to the specified position.

Trajectory Planning in Landing Phase
When the robot's foot contacts the ground again at the end of the flight phase, the foot is firmly placed on the ground. Therefore, we can obtain the joint position la n d  Figure 5, to avoid the rebound of the robot, which is caused by the touchimpact between the ground and the foot, and reduce the force acting on the foot, the actuated joints push the vertical CoM component to drop at the beginning of the landing phase. Then, the CoM starts to increase, which effectively prevents the robot from squatting too low and causing the knee to exceed the hardware capabilities.

Trajectory Planning in Landing Phase
When the robot's foot contacts the ground again at the end of the flight phase, the foot is firmly placed on the ground. Therefore, we can obtain the joint position Θ land initial and velocity . Θ land initial through the joints' codes, and calculate the position x land com→initial , y land com→initial and velocity .
x land com→initial , . y land com→initial . The desired CoM trajectories and the hip angle can be expressed by using cubic polynomials, considering that the initial joint positions and velocities are known and the terminal positions and velocities of the CoM and hip are given.
As shown in Figure 5, to avoid the rebound of the robot, which is caused by the touch-impact between the ground and the foot, and reduce the force acting on the foot, the actuated joints push the vertical CoM component to drop at the beginning of the landing phase. Then, the CoM starts to increase, which effectively prevents the robot from squatting too low and causing the knee to exceed the hardware capabilities.

Real-Time Control of Jump Motion
In the stance phase, we assume that the robot's foot is always in contact with the ground without sliding. Hence, the three-link robot is fully actuated and the controllers in the launch phase and landing phase are the same. In the stance phase, the robot needs to track the well planned reference trajectories, limit angular momentum with respect to CoM into a small range, and satisfy many constraints, such as ZMP, anti-slippage and so on. In the iterative method for solving nonlinear equations, constraints cannot be considered. Therefore, the optimization method was chosen. The sampling interval for the jumping robot is 4ms or even shorter. The solutions cannot be obtained in real time by using nonlinear optimization method, the more efficient QP algorithm was selected. Eigen-QuadProg can solve the QP problem within 0.6 ms on the quadcore computer (Intel

Real-Time Control of Jump Motion
In the stance phase, we assume that the robot's foot is always in contact with the ground without sliding. Hence, the three-link robot is fully actuated and the controllers in the launch phase and landing phase are the same. In the stance phase, the robot needs to track the well planned reference trajectories, limit angular momentum with respect to CoM into a small range, and satisfy many constraints, such as ZMP, anti-slippage and so on. In the iterative method for solving nonlinear equations, constraints cannot be considered. Therefore, the optimization method was chosen. The sampling interval for the jumping robot is 4ms or even shorter. The solutions cannot be obtained in real time by using nonlinear optimization method, the more efficient QP algorithm was selected. Eigen-QuadProg can solve the QP problem within 0.6 ms on the quadcore computer (Intel Celeron J1900, 1.99 GHz), which completely satisfy to obtain the solution online [27]. In the flight phase, the planned trajectories of two actuated joints are directly given to the servo control blocks at the actuator level.

Cartesian Space Controller
In the stance phase, we are concerned with whether the CoM of the robot can realize the kinematic performance of an inverted pendulum, as described in the previous section. Therefore, we applied PD feedback controllers such that the CoM trajectory could track the planned motion of the inverted pendulum in the vertical and horizontal direction, respectively.
The derivative and acceleration of the robot's CoM in the horizontal directions is expressed as follows: In the vertical directions, the CoM acceleration is expressed as follows: .
where J x and J y are the Jacobian vectors of the CoM in the horizontal and vertical component, respectively. In the horizontal direction, the input ..
x * com can be calculated as follows: ..        With regard to upward jumping, it is much easier for the angular momentum to remain close to zero before the foot leaves the ground, compared with compensating for the angular momentum by the motion of the actuated joints in the flight phase. Therefore, we need to add a controller to constrain the angular momentum close to zero. The angular momentum of the robot is given as follows: The input ..

L *
CoM can be calculated as follows: where J L denotes the Jacobian vectors of angular momentum, and L d CoM is the desired angular momentum position. Because the ultimate goal is that the angular momentum should reach zero, we set L d CoM equal to zero. The optimization problem for the angular momentum in the launch phase can be expressed as follows:

Joint Space Controller
In addition to CoM tracking for the planned inverted pendulum's kinematic trajectory, we also expect that the joints of the robot can track the planned joints' trajectory.
The input ..
The joint tracking problem can be formulated as follows:

Constraints
As shown in the Figure 6, the supporting leg of the inverted pendulum intersects the x-axis at the support point O, whose coordinate is (ZMP x , 0, 0), and the moment of CoM acting on the support point around the z axis is applied as follows:

Constraints
As shown in the Figure 6, the supporting leg of the inverted pendulum intersects the x-axis at the support point O, whose coordinate is ( ) To prevent the horizontal slippage of the foot, the friction constraint is applied as follows: The joint acceleration cannot exceed the limitation; therefore, the upper and lower bounds of the state variables are restricted as follows: Figure 6. The inverted pendulum model.
Since the moment of CoM acting on the support point around the z axis is zero, the equation of ZMP can be expressed as follows: ..
x com y com g + ..

y com
To ensure the margin of control during the launch phase, a smaller support polygon constraints l min and l max are selected in the trajectory planning. Now, we select the support polygon constraints L min and L min according to the simulation model. Therefore, the ZMP constraints can be expressed as follows: So ZMP are restricted as follows: ..
x com y com g + ..
To prevent the horizontal slippage of the foot, the friction constraint is applied as follows: ..
x com ≤ u s ..
The joint acceleration cannot exceed the limitation; therefore, the upper and lower bounds of the state variables are restricted as follows: ..
There are two task goals in Cartesian space and two task goals in joint space, but the robot has only three actuated joints, which is obviously an over-constrained and occasionally conflicting problem that can be solved through optimization with different weights applied to the optimization problems to distinguish the priority of different goals. Hence, the problem can be formulated as follows: x com ≤ u s ..
where, w x , w y , w Θ , w f re_osc and w L are weights for different optimization tasks.

Transformation from Nonlinear Optimization Problem to QP Optimization Problem
The convergence of QP optimization is sufficiently fast for obtaining the solution in real time. Therefore, we selected QP as the method for solving this optimization problem. The problem formulated in Equation (42) can be transformed into a standard QP problem, and the following relationships can be obtained:

Flight Phase
In the trajectory generation of the robot's flight phase, it is considered that the robot is only subjected to gravity in the vertical direction, the linear momentum is in the horizontal direction, and the angular momentum with the CoM is conserved. Therefore, we only need to feed the well-planned angles to the actuated joint in each sampling period to achieve the desired ballistic dynamics of the robot and prepare for landing on the ground with the desired configuration.

Simulation Results
To validate the upward jump control method for the three-link planar biped robot, a computer simulation was conducted using Matlab/Simulink. In the simulation, L min = −0.13 and L max = 0.13, which are determined by the size of the designed robot's foot. The weights w x , w y and w L respectively determine the relative priorities of tracking of CoM in the directions of the x-axis and y-axis and tracking of angular momentum; a higher relative priority is indicated by a larger value. So we choose the larger w x and w y . w f re_osc penalizes the change in the angular acceleration of the joints between two consecutive time steps, and w Θ determines the relative priority of the joints' tracking of the desired trajectories. In the weighting matrices w f re_osc and w Θ , only the diagonal elements corresponding to the joints are set to non-zero values. Firstly, because the priority of CoM is higher and the priority of angular momentum and joints is lower, w x = w y = 1, w L = 0.0006 and w f re_osc = w Θ = diag([ 0.0006,0.0006, 0.0006]) were chosen as the initial weights. Then, due to the poor tracking of CoM at the initial weights, w x and w y were manually increased according to the simulation results. The CoM tracked the desired trajectory very well at w x = w y = 1.6. Because of the poor joints' changes and large angular momentum, w f re_osc , w Θ and w L were manually increased under fixed w x and w y , angular momentum fluctuated within a small range and the changes of joints' positions are consistent with the desired trajectories at w L = 0.001 and w f re_osc = w Θ = diag([ 0.001,0.001, 0.001]).
The initial joint parameters, weights, and gains are listed in Tables 4-6, respectively. The simulation results are presented in Figures 7-11.   The response ZMP is illustrated in Figure 9a, the green, red, and blue plots are the upper and lower bounds of the support polygon and the ZMP plot, respectively. As can be seen, the ZMP response was always within the support polygon. Hence, it can be concluded that the robot was stable in the stance phase. Figure 9b shows the plot of the foot's horizontal component. As can be seen, in the stance phase, the sliding of the robot's foot was less than 0.5 cm. With regard to the touchdown impact, the movement of the foot in the horizontal component is almost negligible. Figure 9c shows that the angular momentum in the stance phase had a relatively small range, the maximum angular momentum did not exceed 2 N⋅m⋅s, and the angular momentum in the flight phase was less than 0.5 N⋅m⋅s. Therefore, it is concluded that fall and foot slippage prevention were successfully added to the constraints of the optimization problem, and the penalty function of the angular momentum was added to the cost function constraint's angular momentum within a small range.  The response ZMP is illustrated in Figure 9a, the green, red, and blue plots are the upper and lower bounds of the support polygon and the ZMP plot, respectively. As can be seen, the ZMP response was always within the support polygon. Hence, it can be concluded that the robot was stable in the stance phase. Figure 9b shows the plot of the foot's horizontal component. As can be seen, in the stance phase, the sliding of the robot's foot was less than 0.5 cm. With regard to the touchdown impact, the movement of the foot in the horizontal component is almost negligible. Figure 9c shows that the angular momentum in the stance phase had a relatively small range, the maximum angular momentum did not exceed 2 N⋅m⋅s, and the angular momentum in the flight phase was less than 0.5 N⋅m⋅s. Therefore, it is concluded that fall and foot slippage prevention were successfully added to the constraints of the optimization problem, and the penalty function of the angular momentum was added to the cost function constraint's angular momentum within a small range.    As shown in Figure 11, the joint trajectories exhibit smooth variation within the joints' limitations, except at the initial landing phase owing to the touch-down impact. The hip, knee, and ankle have different degrees of sharp edges at the moment of touch-down. The   As shown in Figure 11, the joint trajectories exhibit smooth variation within the joints' limitations, except at the initial landing phase owing to the touch-down impact. The hip, knee, and ankle have different degrees of sharp edges at the moment of touch-down. The The response ZMP is illustrated in Figure 9a, the green, red, and blue plots are the upper and lower bounds of the support polygon and the ZMP plot, respectively. As can be seen, the ZMP response was always within the support polygon. Hence, it can be concluded that the robot was stable in the stance phase. Figure 9b shows the plot of the foot's horizontal component. As can be seen, in the stance phase, the sliding of the robot's foot was less than 0.5 cm. With regard to the touchdown impact, the movement of the foot in the horizontal component is almost negligible. Figure 9c shows that the angular momentum in the stance phase had a relatively small range, the maximum angular momentum did not exceed 2 N·m·s, and the angular momentum in the flight phase was less than 0.5 N·m·s. Therefore, it is concluded that fall and foot slippage prevention were successfully added to the constraints of the optimization problem, and the penalty function of the angular momentum was added to the cost function constraint's angular momentum within a small range. sharp edges of the knee joint and ankle joint are larger, which demonstrates that the impact force causes more severe damage to the knee and ankle joints. Figure 11. Joint trajectories in simulation.

Discussion
Similar to the vertical jumping motion of humans, in the process of the robot's vertical jump, constraints such as the stability, anti-slippage, and joint angular accelerations must be simultaneously considered. However, a method that considers all of these issues and integrates them into the jumping motion does not exist.
The proposed method is based on QP optimization and has good scalability. The above-mentioned restrictions, which must be considered, are unified into the proposed framework. In this paper, the trajectory optimization in the launch phase was first transcribed into an offline nonlinear optimization, and the trajectories in the flight phase and land phase were represented online using cubic polynomial interpolation. Moreover, an online QP-based framework was designed based on three-link dynamics to realize the robot's upward jump motion, and successfully unified hard constraints such as the ZMP limitations and anti-slippage, and over-constrained tasks such as CoM, joint, and angular momentum tracking.
In this paper, an online QP optimization framework was designed based on threelink dynamics to realize a robot's upward jump motion and successfully unify hard constraints, such as ZMP limitations and anti-slippage, and over-constrained tasks such as CoM, joint, and angular momentum tracking. The following results were obtained: (1) The robot achieved a successful upward jump to the height of 16.4 cm.
(2) Throughout the stance phase, the ZMP was always limited inside the support polygon instead of tracking the desired value. Additionally, the movement of the foot in the horizontal component was almost negligible. (3) The angular momentum in the stance phase had a relatively small range, the maximum angular momentum did not exceed 2 N·m·s, and the angular momentum in the flight phase was less than 0.5 N·m·s.
In future work, we will extend the jump algorithm to running robots. To this end, a substantial amount of work must be carried out. For example, the control of the simplified model in the jumping motion should be extended to the control of a full dynamics model in the running robot. In the support phase, the movement of the swinging leg should be controlled in addition to controlling the movement of the supporting leg. Owing to the compatibility and scalability of the QP-based framework, the extension of the jumping The trajectories in the horizontal and vertical position of the CoM and the corresponding errors are shown in Figure 10. The sharp edges in the CoM and the corresponding errors were observed at the moment of touch-down owing to the touch-down impact. Because the CoM was not controlled during the flight phase, the CoM error disappeared in the flight phase. The CoM's error trajectories indicate that the maximum error in the horizontal position was 0.038 m at 0.244 s, while that in the vertical position was 0.076 m at 0.212 s. Therefore, it is concluded that the response trajectories are in good agreement with previously obtained results.
As shown in Figure 11, the joint trajectories exhibit smooth variation within the joints' limitations, except at the initial landing phase owing to the touch-down impact. The hip, knee, and ankle have different degrees of sharp edges at the moment of touch-down. The sharp edges of the knee joint and ankle joint are larger, which demonstrates that the impact force causes more severe damage to the knee and ankle joints.

Discussion
Similar to the vertical jumping motion of humans, in the process of the robot's vertical jump, constraints such as the stability, anti-slippage, and joint angular accelerations must be simultaneously considered. However, a method that considers all of these issues and integrates them into the jumping motion does not exist.
The proposed method is based on QP optimization and has good scalability. The abovementioned restrictions, which must be considered, are unified into the proposed framework. In this paper, the trajectory optimization in the launch phase was first transcribed into an offline nonlinear optimization, and the trajectories in the flight phase and land phase were represented online using cubic polynomial interpolation. Moreover, an online QP-based framework was designed based on three-link dynamics to realize the robot's upward jump motion, and successfully unified hard constraints such as the ZMP limitations and antislippage, and over-constrained tasks such as CoM, joint, and angular momentum tracking.
In this paper, an online QP optimization framework was designed based on three-link dynamics to realize a robot's upward jump motion and successfully unify hard constraints, such as ZMP limitations and anti-slippage, and over-constrained tasks such as CoM, joint, and angular momentum tracking. The following results were obtained: (1) The robot achieved a successful upward jump to the height of 16.4 cm.
(2) Throughout the stance phase, the ZMP was always limited inside the support polygon instead of tracking the desired value. Additionally, the movement of the foot in the horizontal component was almost negligible. (3) The angular momentum in the stance phase had a relatively small range, the maximum angular momentum did not exceed 2 N·m·s, and the angular momentum in the flight phase was less than 0.5 N·m·s.
In future work, we will extend the jump algorithm to running robots. To this end, a substantial amount of work must be carried out. For example, the control of the simplified model in the jumping motion should be extended to the control of a full dynamics model in the running robot. In the support phase, the movement of the swinging leg should be controlled in addition to controlling the movement of the supporting leg. Owing to the compatibility and scalability of the QP-based framework, the extension of the jumping algorithm to running robots can be successfully incorporated into the proposed algorithmic framework.