Fast model predictive control method, system and medium for quadruped robot
By adopting quadratic programming optimization and hot start strategy on the quadruped robot, the problem of time-consuming MPC control law solution and inequality constraint processing is solved, and more efficient control update frequency and stability are achieved, which is suitable for complex terrain and high dynamics. sports.
Patent Information
- Application Number
- CN202310122231.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-09
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-02-09
AI Technical Summary
The solution process of the model predictive control (MPC) control law on the quadruped robot takes too long, resulting in low control frequency and reduced performance. The MPC controller based on differential dynamic programming (DDP) cannot handle inequality constraints, and the MPC control based on optimization The linearization step of the controller is only effective when the controller updates quickly, which is difficult to meet the requirements of highly dynamic motion.
By obtaining the model prediction control rate of the standing leg and swinging leg, rolling time domain optimization based on quadratic programming is adopted, the approximate Hessian matrix is transformed into an approximate quadratic programming problem, the global invalid constraints are deleted, and the optimal reaction force cache is used for dimensional auto-scaling. Adaptable hot start strategy improves the efficiency of solving the control rate.
Significantly improves the control update frequency of quadruped robots, enables rapid model predictive control in more challenging scenarios, solves the problem of long time-consuming control law solution and inequality constraint processing, and improves the real-time performance and stability of the controller. .
Smart Images

Figure CN116339362B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robots, and in particular relates to a fast model predictive control method, system and medium for a quadruped robot. Background Art
[0002] Quadruped robots can move in environments that wheeled robots cannot access, such as diverse field terrains, stairs, etc. However, controlling the motion of quadruped robots is challenging due to the high degrees of freedom of the robot and the fact that the quadruped gait is usually dynamically unstable. Recently, model predictive control (MPC) has become one of the most popular approaches in quadruped robot research, achieving excellent performance on highly dynamic motions and complex terrains. However, a key challenge in implementing MPC controllers on quadruped robots is that the solution process of the MPC control law is too time-consuming, resulting in low control frequency, performance degradation, and even controller failure.
[0003] The power of MPC lies in its ability to predict the future, which is particularly useful for unstable systems such as dynamic quadrupedal motion. A major MPC controller for quadrupedal robot motion control is based on differential dynamic programming (DDP). For example, a method based on iLQR was proposed and verified on HyQ and ANYmal. The basic step of the controller is to forward integrate the system dynamics using the last calculated control trajectory. It essentially uses an approximation technique to construct a linear quadratic optimal control (LQOC) problem and solves it based on the method of Riccati equations. This technique is also used in other DDP-based quadruped motion controllers. However, DDP-based MPC controllers cannot handle inequality constraints.
[0004] Another type of MPC controller uses an optimization algorithm to solve mathematical programming problems in real time. For example, a quadratic program (QP) is formulated to calculate the optimal ground reaction forces and achieve highly dynamic motions on the MIT Cheetah 3 and mini Cheetah. This controller implicitly uses the direct multi-shooting method of numerical optimal control techniques. A significant advantage of optimization-based MPC controllers is that they can directly handle inequality constraints and guarantee the feasibility of the control law. This advantage may be a potential reason why highly dynamic and unstable motions can be stabilized on real quadruped robots, such as galloping, high-speed trotting, and somersaults. However, an important step of the optimization-based MPC controller is to linearize the system dynamics around some predefined trajectories, which is only effective if the controller is updated quickly enough. Therefore, improving the solution rate of MPC is a top priority for this method.
[0005] Through the above analysis, the problems and defects of the prior art are as follows:
[0006] (1) The solution process of the model predictive control (MPC) control law is too time-consuming. Implementing an MPC controller on a quadruped robot can easily lead to low control frequency, performance degradation, or even controller failure.
[0007] (2) The MPC controller based on differential dynamic programming (DDP) cannot handle inequality constraints;
[0008] (3) An important step in the optimization-based MPC controller is to linearize the system dynamics around some predefined trajectories. This linearization is only effective if the controller is updated fast enough, but the solution rate of MPC is difficult to meet the requirement. Summary of the invention
[0009] In view of the problems existing in the prior art, the present invention provides a method, system and medium for fast model predictive control of a quadruped robot.
[0010] The present invention is implemented as follows: a fast model predictive control method for a quadruped robot, the fast model predictive control method for a quadruped robot comprising:
[0011] Control the motion of the quadruped robot by obtaining the model-predicted control rates of the stance and swing legs;
[0012] The process of obtaining the model prediction control rate of the stance leg includes:
[0013] Step 1: Perform rolling horizon optimization based on quadratic programming;
[0014] Step 2: By approximating the Hessian matrix, the original quadratic programming problem is transformed into an approximate quadratic programming problem;
[0015] Step 3: According to the current robot state, delete the global invalid constraints in the approximate quadratic programming problem;
[0016] Step 4: Use the optimal reaction force cache to perform a dimensionally adaptive hot start strategy to obtain the model predicted control rate of the standing leg.
[0017] Further, the process of obtaining the control rate of the swing leg includes:
[0018] First, the expected trajectory of the foot end of the swinging leg in the air is calculated according to the expected trajectory;
[0019] Then, inverse kinematics is used to calculate the desired motor positions;
[0020] Finally, using a simple proportional-derivative (PD) controller to track the motor position, the motor torque is:
[0021]
[0022] Where, the subscript i represents the i-th motor, θ d,i is the desired motor position, θ i and are the current motor position and speed, k p,i and k d,i They are the PD parameters respectively.
[0023] Further, the specific process of step one is:
[0024] (1) List the following quadratic programming problem and solve the optimal ground reaction force:
[0025]
[0026]
[0027]
[0028]
[0029]
[0030] Where, the subscript i represents the i-th moment, n is the total prediction step length, θ is the robot body steering angle in the global coordinate system, p is the body coordinate in the global coordinate system, ω is the body angular velocity, is the body linear velocity, is the ground reaction force of the kth standing leg, The friction constraint inequality parameter representing the ground reaction force, L i and K i is the weighted parameter matrix;
[0031] (2) Replace x in the original quadratic programming problem i+1 Eliminate and obtain the following new quadratic programming problem:
[0032]
[0033]
[0034] In the formula, H t is the Hessian matrix, U t =[u t ,…,u t+n ], solving the new quadratic programming problem to obtain the optimal ground reaction force
[0035] (3) Using the Jacobian matrix J i Calculate the torque of the corresponding motor:
[0036]
[0037] Furthermore, the approximate quadratic programming problem is constructed according to an approximate method to replace the original quadratic programming problem. The approximate method is:
[0038] H t ≈H t-1 , c t ≈c t-1 and
[0039] The approximate quadratic programming is:
[0040]
[0041]
[0042] Wherein, subscript t, t-1 represents the corresponding time.
[0043] Furthermore, the global invalid constraint is an inequality constraint that remains in an invalid state within the entire control range, including two types of constraints, the first being a constraint perpendicular to the ground force, and the second being a lower limit constraint on the friction force when the robot accelerates, or an upper limit constraint on the friction force when the robot decelerates.
[0044] Furthermore, the specific process of the dimension-adaptive hot start strategy is as follows:
[0045] First, a buffer is established to store the best ground reaction force calculated at each moment;
[0046] Then, the optimal ground reaction force is extracted from the buffer zone as the initial solution to the optimization problem being solved at the current moment.
[0047] Furthermore, the buffer storage upper limit is greater than the maximum step length of the model predictive control, thereby ensuring that each leg can obtain the historical best ground reaction force in the buffer at each moment;
[0048] At the same time, the buffer is dynamically updated, and the update frequency is consistent with the control frequency. When the update frequency is high, the historical optimal ground reaction force is close to the optimal ground reaction force calculated at the current moment, and the hot start strategy initializes the optimization problem to obtain the model control rate at the current moment.
[0049] Another object of the present invention is to provide a method for implementing the fast model predictive control system of the quadruped robot, the fast model predictive control system of the quadruped robot comprising:
[0050] Swing leg control module: used to calculate the desired trajectory of the swing leg and track the motor position;
[0051] Stance leg control module: used to calculate the model predictive control rate of the stance leg;
[0052] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to execute the steps of the quadruped robot fast model predictive control method.
[0053] Another object of the present invention is to provide an information data processing terminal, which is used to implement the fast model predictive control system of the quadruped robot.
[0054] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0055] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems. The specific description is as follows:
[0056] (1) The present invention transforms the original problem into a new approximate quadratic programming problem by approximating the Hessian matrix, which is easier to solve than the original problem.
[0057] (2) Based on the current robot state, the present invention reasonably assumes that certain constraints are globally invalid constraints, thereby reducing the dimension of the problem.
[0058] (3) The present invention utilizes the optimal reaction force cache to achieve hot start under different problem dimensions, further accelerating the solution of the predicted control rate.
[0059] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:
[0060] The present invention proposes a fast model predictive control method for quadruped robot control. According to the dynamic model, the rolling time domain optimization problem of the optimal ground reaction force is solved, and three numerical optimization techniques are specifically proposed. The fast model predictive control of various gaits of the quadruped robot can be realized, and the control update frequency can be significantly improved.
[0061] Third, as auxiliary evidence of the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:
[0062] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are:
[0063] The present invention belongs to the field of robotics technology. It constructs a rolling time-domain optimization problem for solving the optimal ground reaction force based on a dynamic model, and specifically proposes three numerical optimization techniques, which can realize rapid model predictive control of various gaits of quadruped robots. This method is conducive to the application of quadruped robots in more challenging scenarios (such as military industry) and has huge commercial value.
[0064] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0065] The present invention adopts numerical optimization techniques to solve the problem of too long time in solving the rolling time domain optimization problem of the optimal ground reaction force, making it more effective when linearizing the system dynamics around some predefined trajectories, and realizing fast model predictive control of various gaits of the quadruped robot.
[0066] (3) Whether the technical solution of the present invention solves the technical problems that people have been eager to solve but have not been able to solve successfully:
[0067] An important step of the optimization-based MPC controller is to linearize the system dynamics around some predefined trajectories, which is only effective when the controller is updated fast enough. The present invention solves this technical problem by transforming the original quadratic programming problem into a new approximate quadratic programming problem, reasonably assuming that some constraints are globally invalid constraints, and realizing hot start under different problem dimensions. These three numerical optimization techniques significantly improve the control update frequency.
[0068] (4) Whether the technical solution of the present invention overcomes technical prejudice:
[0069] Solving the rolling horizon optimization problem based on quadratic programming requires a lot of computing time. In particular, when the dimension of the optimization problem is relatively high due to factors such as the long prediction horizon, the rate of solving the problem cannot meet the real-time control of the quadruped robot. The present invention adopts three techniques to accelerate the control rate and realize rapid model predictive control. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a flow chart of the fast model predictive control method of a quadruped robot provided by an embodiment of the present invention.
[0071] Figure 2 (a): Experimental effect diagram of the three-legged walking gait of the quadruped robot.
[0072] Figure 2 (b): Graph showing the effect of the quadruped robot’s diagonal trotting gait test.
[0073] Figure 2 (c): Result of the trotting gait test of the ipsilateral leg of the quadruped robot.
[0074] Figure 2 (d): Effect picture of a quadruped robot climbing a hill in the field. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0076] In order to enable those skilled in the art to fully understand how to implement the present invention in detail, this section is an explanatory embodiment that expands and describes the technical solution of the claims.
[0077] like Figure 1 As shown, the fast model predictive control method for a quadruped robot provided by an embodiment of the present invention includes:
[0078] Control the motion of the quadruped robot by obtaining the model-predicted control rates of the stance and swing legs;
[0079] The process of obtaining the model prediction control rate of the stance leg includes:
[0080] S101, performing rolling horizon optimization based on quadratic programming;
[0081] S102, transforming the original quadratic programming problem into an approximate quadratic programming problem by approximating the Hessian matrix;
[0082] S103, deleting global invalid constraints in the approximate quadratic programming problem according to the current robot state;
[0083] S104, using the optimal reaction force cache, performing a dimensionally adaptive hot start strategy to obtain a model predicted control rate of the standing leg.
[0084] The fast model predictive control system of a quadruped robot provided by an embodiment of the present invention specifically includes:
[0085] Swing leg control module: used to calculate the desired trajectory of the swing leg and track the motor position;
[0086] Stance leg control module: used to calculate the model predictive control rate of the stance leg;
[0087] Furthermore, the process of acquiring the model prediction control rate of the swing leg includes:
[0088] First, the expected trajectory of the foot end of the swinging leg in the air is calculated according to the expected trajectory;
[0089] Then, inverse kinematics is used to calculate the desired motor positions;
[0090] Finally, using a simple proportional-derivative (PD) controller to track the motor position, the motor torque is:
[0091]
[0092] Where, the subscript i represents the i-th motor, θ d,i is the desired motor position, θ i and are the current motor position and speed, k p,i and k d,i They are the PD parameters respectively.
[0093] The quadratic programming problem provided in the embodiment of the present invention specifically refers to:
[0094]
[0095]
[0096]
[0097] in,
[0098]
[0099]
[0100] The subscript i of each physical quantity represents the i-th moment, n is the total prediction step length, θ is the robot body steering angle in the global coordinate system, p is the body coordinate in the global coordinate system, ω is the body angular velocity, is the body linear velocity, is the ground reaction force of the kth standing leg. The friction constraint inequality parameter representing the ground reaction force, L i and K i is the weighted parameter matrix. i+1 Eliminate, and we can get the following quadratic programming problem:
[0101]
[0102]
[0103] in,
[0104] U t =[u t ,…,u t+n ],
[0105] Other matrices or vectors,
[0106] That is H t , ,
[0107] It can be calculated from the original problem. Solving this problem can obtain the optimal ground reaction force Then use the Jacobian matrix J i The torque of the corresponding motor can be calculated:
[0108]
[0109] The approximate quadratic programming problem provided in the embodiment of the present invention is constructed by assuming that some state changes that affect the construction of the quadratic programming problem are very small, and the following approximation techniques are used:
[0110] H t ≈H t-1 , c t ≈c t-1 and
[0111] Thus, the following approximate quadratic programming problem is constructed to replace the original quadratic programming problem:
[0112]
[0113]
[0114] Among them, the subscripts of each physical quantity represent the corresponding time. Compared with the original exact quadratic programming, the approximate quadratic programming uses the Hessian matrix H of the quadratic programming problem constructed at the previous moment. t-1 and inequality constraints. In addition to saving time in constructing matrices, this approximate quadratic programming problem is easier to solve than the original problem.
[0115] The reasonable assumptions provided by the embodiments of the present invention are that some constraints are globally invalid constraints, which are defined as inequality constraints that remain in an invalid state within the entire control range. If the globally invalid constraints can be set in advance according to the robot state, these redundant constraints can be deleted in the optimization problem, reducing the problem dimension and thus improving the solution efficiency.
[0116] In the present invention, two types of constraints can be reasonably set as globally invalid constraints. First, the constraint perpendicular to the ground force can be assumed to be a globally invalid constraint, so the reaction force is only related to the collision and has nothing to do with friction, and the motor of the quadruped robot generally has enough power to output force in this direction. Another globally invalid constraint can be analyzed as follows. First, the friction force has an upper limit (representing acceleration) and a lower limit (representing deceleration). If the constraint corresponding to the upper limit is active, it means that the robot is accelerated to the limit. Then the lower limit will never be activated. Therefore, when the robot accelerates, the lower limit constraint is identified as a globally invalid constraint. Similarly, when the robot decelerates, the upper limit constraint is identified as a globally invalid constraint.
[0117] The embodiments of the present invention provide a method for implementing hot start under different problem dimensions, wherein hot start is a common technique for iterative algorithms in optimization. For interior point methods, hot start is almost impossible. For active set methods, hot start is particularly important: if we initialize the initial active set to the best active set, the optimal solution can be obtained directly in the first iteration. However, the legs of the quadruped robot that touch the ground are different at each moment, so the quadratic programming problem at each moment may have different dimensions.
[0118] In order to achieve hot start of quadratic programming in different dimensions, the present invention establishes a buffer for storing the best ground reaction force calculated at each moment. The hot start strategy of the present invention is to extract the optimal ground reaction force from the buffer as the initial solution of the optimization problem solved at the current moment. The storage upper limit of the buffer is greater than the maximum step size of the model predictive control, thereby ensuring that each leg can obtain the historical best ground reaction force in the buffer at each moment.
[0119] The buffer is dynamically updated, and its update frequency is consistent with the control frequency. Since the control frequency of the quadruped robot is high, the update frequency of the buffer is also relatively high. When the update frequency is high, the historical optimal ground reaction force and the optimal ground reaction force calculated at the current moment are very close, which means that the hot start strategy of the present invention will initialize the optimization problem very efficiently, thereby quickly obtaining the control rate at the current moment.
[0120] The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages over the prior art. The following content is described in conjunction with data, charts, etc. of the test process.
[0121] The present invention has been successfully implemented on a quadruped robot and has achieved good results in a variety of test environments, as shown in the following figure.
[0122] Figure 2 (a): Experimental effect diagram of the three-legged walking gait of the quadruped robot.
[0123] Figure 2 (b): Graph showing the effect of the quadruped robot’s diagonal trotting gait test.
[0124] Figure 2 (c): Result of the trotting gait test of the ipsilateral leg of the quadruped robot.
[0125] Figure 2 (d): Effect picture of a quadruped robot climbing a hill in the field.
[0126] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0127] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A fast model predictive control method for a quadruped robot, characterized in that: The fast model predictive control method for a quadruped robot comprises: The rolling time domain optimization problem of solving the optimal ground reaction force is constructed based on the dynamic model, and three numerical optimization techniques are proposed specifically, which can realize the fast model predictive control of various gaits of quadruped robots and significantly improve the control update frequency; The movement of the quadruped robot is controlled by acquiring the model predictive control rate of the standing leg and the swinging leg; the process of acquiring the model predictive control rate of the standing leg includes: Step 1: Perform rolling horizon optimization based on quadratic programming; Step 2: By approximating the Hessian matrix, the original quadratic programming problem is transformed into an approximate quadratic programming problem; Step 3: According to the current robot state, delete the global invalid constraints in the approximate quadratic programming problem; Step 4: Utilize the optimal reaction force cache to perform a dimensionally adaptive hot start strategy to obtain the model predicted control rate of the standing leg; The specific process of step one is: (1) List the following quadratic programming problem and solve the optimal ground reaction force: Where, the subscript i represents the i-th moment, n is the total prediction step length, θ is the robot body steering angle in the global coordinate system, p is the body coordinate in the global coordinate system, ω is the body angular velocity, is the body linear velocity, is the ground reaction force of the kth standing leg, The friction constraint inequality parameter representing the ground reaction force, L i and K i is the weighted parameter matrix; (2) Replace x in the original quadratic programming problem i+1 Eliminate and obtain the following new quadratic programming problem: In the formula, H t is the Hessian matrix, U t =[u t ,…,u t+n ], the new quadratic programming problem can be solved by any existing solver to obtain the optimal ground reaction force (3) Using the Jacobian matrix J i Calculate the torque of the corresponding motor: The approximate quadratic programming problem is constructed according to an approximate method to replace the original quadratic programming problem. The approximate method is: H t ≈H t-1 , c t ≈ c t-1 and The approximate quadratic programming is: In the formula, the subscript t, t-1 indicates the corresponding time; The global invalid constraint is an inequality constraint that maintains an invalid state in the entire control range, including two types of constraints, the first type is a constraint perpendicular to the ground force, and the second type is: a lower limit constraint of the friction force when the robot accelerates, or an upper limit constraint of the friction force when the robot decelerates; The specific process of the dimension-adaptive hot start strategy is as follows: Establishing a buffer for storing the best ground reaction force calculated at each moment, and extracting the best ground reaction force from the buffer as an initial solution to the optimization problem to be solved at the current moment; The buffer storage upper limit is greater than the maximum step length of the model predictive control, thereby ensuring that each leg can obtain the historical best ground reaction force in the buffer at each moment; At the same time, the buffer is dynamically updated, and the update frequency is consistent with the control frequency. When the update frequency is high, the historical optimal ground reaction force is close to the optimal ground reaction force calculated at the current moment, and the hot start strategy initializes the optimization problem to obtain the model control rate at the current moment.
2. The fast model predictive control method for a quadruped robot as claimed in claim 1, characterized in that: The process of obtaining the model prediction control rate of the swing leg includes: First, the expected trajectory of the foot end of the swinging leg in the air is calculated according to the expected trajectory; Then, inverse kinematics is used to calculate the desired motor positions; Finally, using a simple proportional-derivative (PD) controller to track the motor position, the motor torque is: Where, the subscript i represents the i-th motor, θ d,i is the desired motor position, θ i and are the current motor position and speed, k p,i and k d,i They are the PD parameters respectively.
3. A quadruped robot fast model predictive control system implementing the quadruped robot fast model predictive control method according to any one of claims 1 to 2, characterized in that: The quadruped robot fast model predictive control system comprises: Swing leg control module: used to calculate the desired trajectory of the swing leg and track the motor position; Stance leg control module: used to calculate the model predictive control rate of the stance leg; Motion control module: used to control the efficient and rapid movement of the quadruped robot.
4. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the fast model predictive control method for a quadruped robot as described in any one of claims 1-2.
5. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the fast model predictive control system of the quadruped robot as described in claim 3.
