Whole body control method and device of humanoid robot, electronic equipment and storage medium
By combining a single rigid body dynamics model and an adaptive neural network model for humanoid robots, the problems of adaptability and robustness of humanoid robots in complex environments are solved, and stable control that can quickly adapt to unknown disturbances online is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SHENMOU TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-05-01
AI Technical Summary
In complex, unstructured environments, existing technologies make it difficult for humanoid robots to achieve real-time adaptability and robustness. Traditional control methods perform poorly when faced with unknown or time-varying disturbances, and data-driven methods lack physical interpretability and generalization ability.
A single rigid body dynamics model of a humanoid robot is established. By combining an adaptive neural network model and a model predictive controller, a perturbation model is pre-trained through a two-layer meta-learning framework. The control quantity is then corrected in real time to generate joint control commands, thereby achieving rapid adaptive and stable motion.
In highly uncertain, unstructured environments, humanoid robots can quickly adapt to unknown disturbances online, achieving stable and precise full-body motion control, significantly improving their robustness and practicality in dynamic scenarios.
Smart Images

Figure CN121946508A_ABST
Abstract
Description
Methods, devices, electronic equipment and storage media for the whole-body control of humanoid robots Technical Field
[0001] This application relates to the field of robot motion control technology, and in particular to whole-body control methods, devices, electronic devices and storage media for humanoid robots. Background Technology
[0002] Locomotion, the core technology in the field of robotics, directly determines the robot's autonomy and practicality in real-world environments. Traditional motion control methods, such as model-based predictive control, can achieve stable and efficient motion under ideal conditions where environmental parameters are known and external disturbances are negligible. However, these methods typically rely on precise and fixed dynamic models. When robots operate in complex, unstructured environments with unknown or time-varying disturbances, such as uneven ground, sudden lateral thrust, or dynamic load changes, fixed models cannot accurately describe the system dynamics. This leads to a significant decrease in the robustness of controllers designed based on these models, easily causing robot instability, increased trajectory tracking deviations, or even mission failure.
[0003] To enhance robots' adaptability to disturbances, recent research has attempted to incorporate machine learning methods to strengthen traditional control frameworks. For example, reinforcement learning can be used to directly learn control strategies, or deep learning can be employed to fit uncertainties in system dynamics. However, these data-driven methods still face significant challenges in practical applications. First, their training heavily relies on large amounts of labeled data specific to particular disturbance scenarios, resulting in high data acquisition costs and low sample efficiency, making it difficult to meet the requirements of robot control for real-time algorithm deployment and rapid adaptation. Second, purely data-driven models often operate as a "black box," lacking interpretability based on physical principles. Furthermore, models trained on specific data distributions have limited generalization ability when faced with novel or complex disturbances not covered by the training set, making it difficult to achieve fast and reliable online adaptation.
[0004] Therefore, improving the real-time adaptability of humanoid robots to enhance their robustness and dynamic performance in complex unstructured environments is a problem that urgently needs to be solved. Summary of the Invention
[0005] The main objective of this application is to provide a method, device, electronic device, and storage medium for the whole-body control of a humanoid robot, aiming to solve the technical problem of how to improve the real-time adaptability of a humanoid robot in complex unstructured environments.
[0006] To achieve the above objectives, this application proposes a method for full-body control of a humanoid robot. The method includes: establishing a single-rigid-body dynamics model of the humanoid robot based on model uncertainties and external disturbance mechanisms; during the operation of the humanoid robot, obtaining the current initial control quantity based on the single-rigid-body dynamics model of the humanoid robot through a model adaptive predictive controller, wherein the model adaptive predictive controller includes an adaptive neural network model; fine-tuning the adjustable parameters in the adaptive neural network model based on the current initial control quantity to dynamically correct the control quantity output by the single-rigid-body dynamics model of the humanoid robot, thereby obtaining the current corrected control quantity; and performing full-body control optimization calculations based on the current corrected control quantity to generate joint control commands.
[0007] In one embodiment, the step of establishing a single-rigid-body dynamics model of a humanoid robot based on model uncertainty and external disturbance mechanisms includes: establishing a basic dynamics model based on the single-rigid-body dynamics equations of the humanoid robot; introducing a lumped uncertainty disturbance term into the basic dynamics model, the lumped uncertainty disturbance term being used to characterize system model uncertainty, external disturbances, and environmental changes; representing the lumped uncertainty disturbance term using a multilayer perceptron to obtain an initial disturbance model; pre-training the initial disturbance model using a two-layer meta-learning framework to obtain a target disturbance model, the two-layer meta-learning framework including an adaptive layer and a meta-update layer; and combining and discretizing the basic dynamics model and the target disturbance model to obtain the single-rigid-body dynamics model of the humanoid robot.
[0008] In one embodiment, the step of pre-training the initial perturbation model using a two-layer meta-learning framework to obtain the target perturbation model includes: defining a task space, which includes multiple tasks, each task corresponding to a specific perturbation condition or environmental condition; sampling multiple sampling tasks from the task space, and for each sampling task, obtaining a corresponding support dataset and query dataset; calculating a first loss of the initial perturbation model under the current task using the support dataset, and obtaining the inner layer adaptive parameters of the current task through gradient update; calculating a second loss based on the inner layer adaptive parameters of the current task and the query dataset corresponding to the current task; aggregating the second losses of all sampling tasks, and updating the original model parameters of the initial perturbation model through gradient descent to obtain the outer layer updated model parameters; using the outer layer updated model parameters as the starting point for the next round of inner layer adaptation for iterative training until a preset iteration termination condition is reached to obtain the target perturbation model.
[0009] In one embodiment, during the operation of the humanoid robot, the step of obtaining the current initial control quantity through a model adaptive predictive controller based on the humanoid robot's single rigid body dynamics model, wherein the model adaptive predictive controller includes an adaptive neural network model, includes: in each control cycle, obtaining the current system state and current control input of the humanoid robot; based on the humanoid robot's single rigid body dynamics model, and based on the current system state and current control input, constructing a model predictive control optimization problem; transforming the model predictive control optimization problem into a standard numerical optimization problem form; using a numerical optimization algorithm to solve the transformed optimization problem to obtain the optimal control input prediction sequence for multiple future times from the current time; and extracting the first control quantity corresponding to the current time from the optimal control input prediction sequence as the current initial control quantity.
[0010] In one embodiment, the step of constructing a model predictive control optimization problem based on the humanoid robot's single-rigid-body dynamics model and according to the current system state and current control input includes: constructing an objective function for rolling optimization within a finite prediction time domain, wherein the objective function is a weighted sum of tracking error and control energy consumption at all times within the prediction time domain, wherein the tracking error term is a weighted quadratic form of the difference between the predicted state and the desired reference state, and the control energy consumption term is a weighted quadratic norm of the control input vector; establishing the discrete-time form corresponding to the humanoid robot's single-rigid-body dynamics model as the equality constraint of the optimization problem, wherein the equality constraint includes a linear dynamic system model with disturbance terms; and establishing inequality constraints regarding the future predicted system state and control input based on the robot's physical constraints.
[0011] In one embodiment, the step of fine-tuning the adjustable parameters in the adaptive neural network model based on the current initial control quantity to dynamically correct the control quantity output by the humanoid robot single-rigid-body dynamics model and obtain the current corrected control quantity includes: inputting the current system state, the current control input, and the deviation between the system state predicted by the humanoid robot single-rigid-body dynamics model at the next moment and the system state actually observed at the next moment into the adjustable part of the adaptive neural network model; performing one or more gradient updates on the adjustable model parameters based on real-time interactive data with the goal of minimizing the deviation to obtain the corrected adjustable model parameters; updating the humanoid robot single-rigid-body dynamics model based on the corrected adjustable model parameters, and recalculating the model predictive control optimization problem based on the updated humanoid robot single-rigid-body dynamics model to obtain the current corrected control quantity.
[0012] In one embodiment, the step of performing whole-body control optimization calculations based on the currently corrected control quantity to generate joint control commands includes: constructing a whole-body control optimization problem, wherein the objective function corresponding to the whole-body control optimization problem includes multiple task tracking error terms, joint acceleration penalty terms, joint torque penalty terms, and tracking deviation penalty terms corresponding to the currently corrected control quantity; establishing constraint conditions based on the humanoid robot's whole-body multi-rigid-body dynamics equations, contact kinematic constraints between the feet and the ground, joint torque limit constraints, joint position limit constraints, and friction cone constraints of contact force information; and transforming the whole-body control optimization problem into a quadratic programming form and solving it based on the constraint conditions to obtain the joint control commands.
[0013] Furthermore, to achieve the above objectives, this application also proposes a whole-body control device for a humanoid robot. The whole-body control device for the humanoid robot includes: a model building module, used to establish a single-rigid-body dynamic model of the humanoid robot based on model uncertainties and external disturbance mechanisms; a preliminary control module, used to obtain the current initial control quantity based on the single-rigid-body dynamic model of the humanoid robot during operation, through a model adaptive predictive controller, wherein the model adaptive predictive controller includes an adaptive neural network model; a control correction module, used to fine-tune the adjustable parameters in the adaptive neural network model based on the current initial control quantity, so as to dynamically correct the control quantity output by the single-rigid-body dynamic model of the humanoid robot, and obtain the currently corrected control quantity; and an instruction generation module, used to perform whole-body control optimization calculations based on the currently corrected control quantity, and generate joint control instructions.
[0014] In addition, to achieve the above objectives, this application also proposes an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the whole-body control method for a humanoid robot as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a non-transitory storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the humanoid robot full-body control method described above.
[0016] The one or more technical solutions proposed in this application have at least the following technical effects: A single rigid body dynamic model of a humanoid robot is established based on model uncertainties and external disturbance mechanisms. By establishing a single rigid body dynamic model of the robot that includes lumped uncertainty terms, the inherent inaccuracies and external disturbances of the system are formally described, thus providing a mathematical object that can be manipulated and corrected by subsequent algorithms to solve the model mismatch problem. Compared with the method of using a fixed ideal model, this lays an adjustable foundation for the model adaptive predictive controller to cope with environmental changes.
[0017] During the operation of the humanoid robot, based on the single rigid body dynamics model of the humanoid robot, the current initial control quantity is obtained through a model adaptive predictive controller, which includes an adaptive neural network model. A model predictive controller with a built-in adaptive neural network module is used to obtain the current initial control quantity. Rolling optimization is performed by combining the basic physical model with the disturbance estimation of the neural network, thereby initially compensating for known model biases at the beginning of the decision-making process. This solves the problem of inaccurate planning under disturbances in traditional model predictive control (MPC) due to a fixed model, and achieves preliminary optimization of control commands.
[0018] Based on the current initial control input, the adjustable parameters in the adaptive neural network model are fine-tuned to dynamically correct the control input output by the humanoid robot's single rigid body dynamics model, thus obtaining the current corrected control input. By applying the actual response generated after applying the control input, the neural network parameters are fine-tuned online with the goal of minimizing the model response deviation. Based on this, the optimization problem is resolved to obtain the corrected control input, establishing a fast online learning closed loop. This solves the problem that the controller cannot instantly improve its own model using real-time interactive information, enabling the system to dynamically adapt to the current actual dynamics with only a very small amount of online data, achieving high-frequency and rapid adaptation to unknown or time-varying disturbances.
[0019] Based on the currently corrected control variables, full-body control optimization calculations are performed to generate joint control commands. This method, which generates joint control commands based on the corrected high-level control variables, resolves the issue of coordination disconnect between high-level commands and lower-level multi-actuator coordination. It achieves accurate tracking of the adaptively optimized motion target while ensuring overall motion coordination and physical feasibility. This embodiment ultimately enables a humanoid robot to quickly adapt to unknown disturbances online in highly uncertain unstructured environments, while simultaneously achieving stable and precise full-body motion control, significantly improving its overall robustness and practicality in dynamic scenarios. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 is a flowchart illustrating the first embodiment of the full-body control method for the humanoid robot of the present invention; Figure 2 is a schematic diagram of the humanoid robot "Monkey King" of the present invention; Figure 3 is a schematic diagram illustrating the principle of data and model fusion driving full-body control for the humanoid robot of the present invention; Figure 4 is a simulation schematic diagram of the humanoid robot of the present invention in Mujoco; Figure 5 is a schematic diagram illustrating the change of the posture angle of the humanoid robot of the present invention over time; Figure 6 is a schematic diagram illustrating the change of the projection of the center of mass of the humanoid robot of the present invention onto the horizontal plane over time; Figure 7 is a schematic diagram illustrating the modular structure of the full-body control device for the humanoid robot of the present invention.
[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0024] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0025] This application provides a method for full-body control of a humanoid robot. Specifically, referring to Figure 1, which is a flowchart of the first embodiment of the method for full-body control of a humanoid robot, this application provides a method for full-body control of a humanoid robot. In this embodiment, the method for full-body control of the humanoid robot includes steps S10 to S40:
[0026] Step S10: Establish a single rigid body dynamic model of the humanoid robot based on model uncertainties and external disturbance mechanisms.
[0027] It should be noted that the single-rigid-body dynamics model is a simplified dynamics model used to describe the overall motion of a humanoid robot. The entire robot can be considered as a single, indeformable rigid body with its mass concentrated at its center of mass, thus greatly simplifying complex multibody dynamics calculations. Model uncertainty refers to the inherent differences between the single-rigid-body model used for control and the actual physical system of the robot, such as estimation errors of mass and inertia parameters, or the simplification and neglect of joint friction and actuator dynamics. External disturbances can be understood as unexpected, time-varying disturbances or torques generated by the robot's working environment during operation, such as impacts caused by uneven ground, lateral wind forces, or unexpected external shoving. For example, a humanoid robot approximately 165cm tall and weighing about 70kg has 27 degrees of freedom, as shown in Figure 2, referencing the humanoid robot "Monkey King".
[0028] Step S20: During the operation of the humanoid robot, the current initial control quantity is obtained through the model adaptive predictive controller based on the single rigid body dynamics model of the humanoid robot.
[0029] It should be noted that the Model Adaptive Predictive Controller (MAPC) can be understood as an enhanced model predictive control architecture specifically designed to cope with uncertain environments. It is a composite architecture with a traditional MPC as its backbone and an embedded adaptive neural network module capable of rapid online learning. Therefore, the MPC includes an adaptive neural network model. The MPC can predict future states and optimize control inputs to generate smooth gait trajectories based on robot model information. The adaptive neural network model refers to a multilayer perceptron pre-trained through meta-learning, whose parameters have the ability to quickly adapt to new tasks. During online operation, the adaptive neural network model is embedded in the MPC framework for real-time estimation and compensation of the system's lumped uncertainty. The current initial control quantity can be understood as the high-level control command applied to the robot at the current moment, output after the MPC solves the optimization problem for the first time in each control cycle. For example, the high-level control command can be the desired foot force or torque.
[0030] Step S30: Based on the current initial control quantity, fine-tune the adjustable parameters in the adaptive neural network model to dynamically correct the control quantity output by the humanoid robot's single rigid body dynamics model, and obtain the current corrected control quantity.
[0031] It should be noted that adjustable parameters can include the connection weights and biases within the adaptive neural network model. During the online operation of the humanoid robot, a small amount of rapid gradient updates can be made to the adjustable parameters in the adaptive neural network model based on a small amount of newly collected real-time interactive data. This makes the model more closely reflect the current instantaneous disturbances, rather than requiring retraining. The currently corrected control quantity refers to the new control command obtained by the model's adaptive predictive controller immediately resolving the optimization problem after the online fine-tuning of the neural network parameters and the updating of the internal predictive model. In other words, the currently corrected control quantity is more closely related to the actual situation than the initial control quantity.
[0032] Step S40: Perform whole-body control optimization calculations based on the current corrected control values to generate joint control commands.
[0033] It should be noted that Whole Body Control (WBC) optimization calculations can optimally decompose and distribute high-level control commands output by the upper-level MPC, such as the center of mass trajectory and foot contact forces, to each joint while satisfying complex constraints such as multi-rigid-body dynamics, joint limits, torque limits, and contact friction. Joint control commands can be understood as the direct control signals generated after WBC optimization calculations and sent to the motors of each joint of the robot, such as the desired joint position, velocity, or torque.
[0034] In this embodiment, a model predictive controller (MPC) integrating an adaptive neural network pre-trained by econometric learning is constructed, deeply combining data-driven adaptability with the model predictive framework. By establishing a single-rigid-body dynamics model of the robot containing lumped uncertainty terms, the inherent inaccuracies and external disturbances of the system are formally described. This provides a mathematical object that can be manipulated and corrected by subsequent algorithms to solve the model mismatch problem. Compared with the method of using a fixed ideal model, this lays an adjustable foundation for the MPC to cope with environmental changes. Furthermore, an MPC with a built-in adaptive neural network module is used to obtain the current initial control quantity. Rolling optimization is performed by combining the basic physical model with the disturbance estimation of the neural network. This allows for preliminary compensation of known model biases at the beginning of the decision-making process, solving the problem of inaccurate planning under disturbances in traditional MPC due to a fixed model, and realizing the initial optimization of control commands. The actual response generated after applying the control input is used to fine-tune the neural network parameters online with the goal of minimizing the model response deviation. Based on this, the optimization problem is resolved to obtain the corrected control input, establishing a rapid online learning closed loop. This solves the problem that the controller cannot instantly improve its model using real-time interactive information, enabling the system to dynamically adapt to the current dynamics with only a minimal amount of online data. This achieves high-frequency, rapid adaptation to unknown or time-varying disturbances. Based on the corrected high-level control input, whole-body control optimization calculations are performed to generate joint control commands, resolving the problem of disconnect between high-level commands and low-level multi-actuator coordination. This allows for precise tracking of the adaptively optimized motion target while ensuring overall motion coordination and physical feasibility. This embodiment ultimately enables a humanoid robot to quickly adapt to unknown disturbances online in highly uncertain unstructured environments, while simultaneously achieving stable and precise whole-body motion control, significantly improving its overall robustness and practicality in dynamic scenarios.
[0035] In one implementation, step S10 includes: step S101, establishing a basic dynamic model based on the single rigid body dynamic equation of the humanoid robot.
[0036] It should be noted that the dynamic equations of a single rigid body describe the governing equations of the motion of an ideal rigid body. The core of these equations is the Newton-Euler equations, which are used to relate the forces or torques acting on the rigid body to the translational and rotational accelerations of its center of mass.
[0037] Step S102: Introduce a lumped uncertainty disturbance term into the basic dynamic model. The lumped uncertainty disturbance term is used to characterize the uncertainty of the system model, external disturbances, and environmental changes.
[0038] For example, considering model uncertainties and external disturbances, the single-rigid-body dynamics model of the robot "Monkey King" can be expressed as: in, For robot quality, The moment of inertia in the mechanical system. , The vector of gravitational acceleration. For the position of the robot's center of mass, For rotation matrix, Angular velocity in the machine system Let be the vector from the center of mass to the foot position. and The force and torque exerted on the feet by the ground. and This represents the total uncertainty of the robot model, including system model uncertainty, external disturbances, environmental changes, etc.
[0039] Step S103: Use a multilayer perceptron to represent the lumped uncertainty perturbation term to obtain the initial perturbation model.
[0040] For example, it is possible to make Let the Euler angles of the robot's body be: , consider The above formula can be approximately expressed as: The following linear expression for the robot dynamics model can be obtained: Here, .make , , We can obtain:
[0041] Furthermore, a multilayer perceptron (MLP) is employed to address the lumped uncertainty of the robot. To represent, that is in, For parameters The neural network represents a nonlinear function.
[0042] Step S104: The initial perturbation model is pre-trained using a two-layer meta-learning framework to obtain the target perturbation model. The two-layer meta-learning framework includes an adaptive layer and a meta-update layer.
[0043] It's important to note that the adaptive layer can be understood as the inner-loop training process. Specifically, for a specific task, such as a particular perturbation scenario, a small subset of data from that task is used to rapidly adjust the parameters of the initial perturbation model in a few steps, generating temporary model parameters for that task. The meta-update layer can be understood as the outer-loop training process. Specifically, the performance of the aforementioned temporary model on another subset of data from the same task is evaluated. These evaluation results are then aggregated across multiple different tasks and used to update the original parameters of the initial perturbation model. The goal is to ensure that the model achieves good performance on new tasks after the rapid adaptation through the inner loop. The target perturbation model refers to the final neural network model obtained after the initial perturbation model has been fully pre-trained using the aforementioned two-layer meta-learning framework.
[0044] Step S105: Combine and discretize the basic dynamic model and the target perturbation model to obtain the humanoid robot single rigid body dynamic model.
[0045] It should be noted that in control engineering, discretization can be understood as the process of transforming a continuous-time differential equation model describing the dynamics of a system into a discrete-time difference equation model suitable for step-by-step iterative calculation by a digital computer, using methods such as the forward Euler method or the zero-order hold method.
[0046] In this embodiment, by introducing a lumped uncertainty perturbation term into the basic dynamic model, the model error and external disturbances are explicitly unified into a mathematical object that can be estimated and compensated. This solves the fundamental problem of inaccurate predictions caused by neglecting or simplifying uncertainties in traditional models, providing a correctable model foundation for subsequent high-precision control. By using a multilayer perceptron, a function with strong nonlinear fitting capabilities, to characterize the lumped uncertainty perturbation term, the limitations of traditional linear perturbation models or fixed-parameter methods in accurately depicting complex, nonlinear perturbation dynamics are overcome, resulting in a qualitative improvement in the model's ability to describe and express various uncertainties. Furthermore, by pre-training the perturbation neural network using a bilayer learning framework, which optimizes the model's initial parameters by simulating a rapid adaptation process on a large number of different perturbation tasks, the problem of traditional neural networks requiring massive amounts of data for retraining for new tasks and being unable to adapt quickly online is solved. This allows the target perturbation model to accurately fit new perturbations with minimal online data. By combining the pre-trained target perturbation model with the basic physical model and discretizing it, a single rigid body dynamics model that integrates prior physical laws and data-driven adaptive capabilities is obtained and can be directly used for model predictive control calculations. This solves the problems of inaccurate pure physical models and lack of physical interpretability and generalization ability of pure data models, laying the core foundation for robust and adaptive control of robots under unknown perturbations.
[0047] In one implementation, step S104 includes: defining a task space, which includes multiple tasks, each task corresponding to a specific perturbation condition or environmental condition; sampling multiple sampling tasks from the task space, and for each sampling task, obtaining the corresponding support dataset and query dataset; calculating the first loss of the initial perturbation model under the current task using the support dataset, and obtaining the inner adaptive parameters of the current task through gradient update; calculating the second loss based on the inner adaptive parameters of the current task and the query dataset corresponding to the current task; aggregating the second losses of all sampling tasks, and updating the original model parameters of the initial perturbation model through gradient descent to obtain the outer updated model parameters; using the outer updated model parameters as the starting point for the next round of inner adaptive training for iterative training until a preset iteration termination condition is reached to obtain the target perturbation model.
[0048] It's important to note that the task space refers to a set of possible scenarios during the pre-training phase, where each element is called a task. Each task specifically refers to a particular, simulable, or data-collectible disturbance or environmental condition, such as walking on surfaces with different friction coefficients, experiencing continuous wind resistance of varying directions and magnitudes, or carrying loads of different weights. A sampling task refers to a subset of tasks randomly selected from the task space in each round of meta-learning training for use in that iteration. For a given sampling task, the support dataset is used to simulate a small batch of data during the rapid adaptation phase. This represents a small number of samples collected under that specific task, used to perform a few gradient updates on the model, temporarily adapting it to the new task. For the same sampling task, the query dataset is used to evaluate the model's performance after rapid adaptation. This dataset does not participate in inner-layer adaptation but is used to evaluate the model's generalization performance on that task after rapid adaptation, and the loss used for meta-updates is calculated accordingly. The first loss can be understood as the loss function value calculated using the support dataset during the inner-layer adaptation process of a single task, used to guide the model parameters to make rapid internal adjustments on that task. The inner adaptive parameters refer to the temporarily adjusted model parameters obtained when the initial perturbation model faces a specific sampling task. These parameters are task-specific and do not directly overwrite the model's original parameters. The second loss can be understood as the loss function value calculated on a query dataset using the inner adaptive parameter model obtained through inner adaptation on a single task. It is used to evaluate the model's performance after quickly adapting to new tasks. In the outer layer of meta-learning, aggregation can be understood as the process of summing the second losses calculated on all sampling tasks in the current batch into a total loss. The updated model parameters in the outer layer refer to the new parameters obtained by updating the original parameters of the initial perturbation model using the sum of the second losses from all tasks through backpropagation via gradient descent. The goal of this update is to optimize the model's initial state so that it can achieve excellent performance with only a few inner updates when facing any new task in the future. The iteration termination condition is a pre-set training stopping criterion, such as reaching the maximum number of training epochs or the model performance no longer improving on the validation set.
[0049] For example, sampling tasks can be obtained from the testing and simulation process of the robot "Monkey King". For each task Obtain support set and query set A support set-based approach can be adopted. Inner loop adaptation and query set based The outer ring element update uses a two-layer element learning structure. First, the first loss can be calculated on the support set, with the corresponding formula:
[0050] in, To support the collection The calculated loss value, , , , , , Each is a corresponding task of , , , , , Based on this, single-step gradient descent is used to update the task. The parameters are given by the following formula:
[0051] in, The inner loop learning rate, This represents the gradient of the loss function with respect to the parameters.
[0052] It should be noted that the outer loop aims to minimize the loss value on the query set while adapting to the inner loop. To achieve this, on the query set... The second loss is calculated, and stochastic gradient descent (SGD) is used to aggregate gradients across tasks to update the meta-parameters. The corresponding formula is:
[0053] in, For the outer loop learning rate, To use adaptive parameters The calculated query set The loss value. Initial parameters obtained during training. It can quickly adapt online, giving the model strong generalization ability, and only requires a small number of gradient steps when adapting online.
[0054] In this implementation, by defining a task space containing various perturbation conditions during the pre-training phase, the model is exposed to a broad and diverse simulated uncertainty environment during the training phase. This solves the problems of traditional methods training in single or limited scenarios and having weak model generalization ability, laying the foundation for dealing with unknown and diverse perturbations in the real world. By constructing support and query datasets for each sampling task, the process of "quickly learning with a small number of samples and then evaluating performance on unseen data" when the model faces a new task is simulated. This solves the problem of the model's inability to quickly adapt to new scenarios, forcing the model to learn perturbation patterns that are inherently related to the task. By calculating the first loss and performing inner gradient updates using the support dataset to obtain inner adaptive parameters for the current task, rapid fine-tuning of the model within a single task is achieved, simulating the key steps required for online adaptation, allowing the model to practice how to quickly adjust itself using very little new data. By calculating the second loss based on the inner adaptive parameters and the query dataset, and using the sum of the second losses from all tasks to drive the outer update of the model's original parameters, the generalization performance after the model's rapid adaptation across different tasks is taken as the direct target of meta-optimization. This solves the problem that optimizing only single-task performance may lead to the initial parameters getting stuck in local optima and failing to adapt quickly to new tasks. By using the outer-updated parameters as a starting point for multiple rounds of iterative training, continuously optimizing the model's initial parameters, a seamless transition from offline multi-task learning to online rapid adaptation is achieved.
[0055] In one implementation, step S20 includes: step S201, in each control cycle, acquiring the current system state and current control input of the humanoid robot.
[0056] It should be noted that in humanoid robot control, the current system state refers to a set of variables describing the robot's instantaneous motion, obtained through sensor measurements or state estimation at the beginning of the current control cycle. Examples include the center of mass position, body posture, center of mass linear velocity, and body angular velocity. The current control input refers to the instructions calculated and output to the robot's actuators in the previous control cycle, such as the desired foot contact force or torque, which serves as a known input when constructing the optimization problem in the current cycle.
[0057] Step S202: Based on the single rigid body dynamics model of the humanoid robot, and based on the current system state and the current control input, construct the model predictive control optimization problem.
[0058] Step S202 includes: constructing an objective function for rolling optimization within a finite prediction time domain, wherein the objective function is the weighted sum of tracking error and control energy consumption at all times within the prediction time domain, wherein the tracking error term is a weighted quadratic form of the difference between the predicted state and the desired reference state, and the control energy consumption term is a weighted quadratic norm of the control input vector; establishing the discrete-time form corresponding to the humanoid robot's single rigid body dynamics model as the equality constraint of the optimization problem, wherein the equality constraint includes a linear dynamic system model with perturbation terms; and establishing inequality constraints regarding the future predicted system state and control input based on the robot's physical constraints.
[0059] It should be noted that the finite prediction time domain refers to the future time range of the optimization problem, usually represented by several discrete time steps. Rolling optimization refers to resolving the optimization problem within a finite time domain based on the latest system state in each control cycle, applying the first element of the solution to the system, and repeating this process in the next cycle, thus achieving closed-loop, continuously revised optimization control based on new information. The objective function can aim to simultaneously minimize tracking error and control energy consumption. The tracking error term, part of the objective function, penalizes the deviation between the robot's predicted future state and the desired reference state. The weighted quadratic form refers to the scalar formed by multiplying the deviation vector left and right by a weight matrix, used to adjust the importance of tracking accuracy for different state components. The control energy consumption term, another part of the objective function, penalizes the magnitude of the control input, aiming to generate smooth, efficient control commands and avoid actuator saturation. The weighted quadratic norm is the squared norm of the control input vector after weighting by the weight matrix. The linear dynamic system model with perturbation terms refers to using the pre-trained and discretized single-rigid-body dynamics model of the humanoid robot as equality constraints. This model is in a linear state-space form, but its constant terms or a portion thereof contain perturbation terms calculated in real time by an adaptive neural network based on the state and input. Therefore, it is represented as a hybrid model of linear dynamic system and neural network perturbation. Inequality constraints are used to characterize the physical limits of the system, such as the contact force must be within the friction cone, joint angles must have a range limit, and the robot's posture must remain stable.
[0060] Step S203: Transform the model predictive control optimization problem into a standard numerical optimization problem.
[0061] The optimization problem described above, which includes an objective function and constraints, can be reformulated as a numerical optimization solver, such as a quadratic programming solver, which can directly recognize and process standard formats. For example, the objective function can be rearranged into a quadratic form, and the constraints can be rearranged into linear equations or inequality matrices.
[0062] For example, the adaptive neural network MPC optimization problem can be established as follows, expressed as: st , , in, To predict the step size, For reference signal, and This is the weight matrix. It represents the system state and the constraints on control signals.
[0063] Step S204: The transformed optimization problem is solved using a numerical optimization algorithm to obtain the optimal control input prediction sequence for multiple future times starting from the current time.
[0064] It should be noted that numerical optimization algorithms refer to specific mathematical computation methods used to solve standardized optimization problems, such as interior-point methods, effective set methods, or active set methods. These algorithms can be encapsulated in optimization solver software. The output of the optimal control input prediction sequence exponential value optimization solver is a series of future control input values that minimize the objective function and satisfy all constraints throughout the entire prediction time domain.
[0065] Step S205: Extract the first control variable corresponding to the current time from the optimal control input prediction sequence, and use it as the current initial control variable.
[0066] For example, since the optimization will be performed again based on the new state in the next control cycle, after obtaining the optimal solution for the entire future sequence, only the first element can be output to the robot for execution, while the predictive control quantities at subsequent times in the sequence can be discarded.
[0067] In this implementation, the latest system state and the control input from the previous moment are acquired in each control cycle, providing accurate initial conditions and known inputs for optimization. This solves the problem of control performance degradation caused by control decisions based on outdated or incomplete information, ensuring that the controller's decisions are always based on the real-time feedback of the current system. By constructing an objective function that includes a weighted sum of tracking error and control energy consumption, the problem of difficulty in achieving balance under different operating conditions with single-objective optimization or fixed weights is solved. By establishing the humanoid robot's single-rigid-body dynamics model as a strict equality constraint, the generated control sequence is guaranteed to be dynamically executable. By establishing hard inequality constraints on state and input based on the robot's physical limitations, key safety and physical feasibility boundaries such as actuator torque limits, joint range of motion, and contact stability are directly encoded into the optimization problem, solving the problem that control commands may exceed hardware capabilities or lead to instability. This ensures the physical realizability of control commands and system safety from the source. By employing specialized numerical optimization algorithms to solve standardized problems online in real time, this approach efficiently and reliably handles convex optimization problems with linear constraints. It overcomes the core bottleneck of excessively long online computation times for complex optimization problems, which fail to meet the real-time requirements of control cycles, ensuring the timely generation of high-quality control commands. By strictly adhering to a rolling time-domain strategy and applying only the control quantity at the current moment from the optimal prediction sequence, it resolves the sensitivity of open-loop predictive control to model errors and disturbances. Through replanning and immediate correction based on the latest state in each cycle, it achieves strong robustness against model biases and unknown disturbances, as well as stable tracking performance of the closed-loop system.
[0068] Since the adaptive neural network model in this embodiment belongs to an indirect adaptive control framework, it is necessary to consider the response deviation of the model itself. Based on this, in one embodiment, step S30 includes: step S301, inputting the current system state, the current control input, and the deviation between the system state predicted by the humanoid robot single rigid body dynamics model at the next moment and the system state at the next moment actually observed into the adjustable part of the adaptive neural network model.
[0069] It should be noted that the model's response bias refers to the difference between the "system state at the next moment predicted by the humanoid robot's single-rigid-body dynamics model" and the "system state at the next moment actually observed." The adjustable part in the adaptive neural network model refers to all the parts of the neural network that can be changed through learning, namely its weights and bias parameters.
[0070] For example, the system's lumped uncertainty model can be learned and updated in real time based on data collected online, and the model response bias can be determined, expressed as: The input to the neural network is the current system state. Control input and model response bias .
[0071] Step S302: With the goal of minimizing the deviation, the adjustable model parameters are updated one or more times based on real-time interactive data to obtain the corrected adjustable model parameters.
[0072] It should be noted that real-time interactive data refers to the actual system state and control input sequence collected within the latest one or several control cycles during robot operation. It represents the system's true, instantaneous response after the current control command is applied. Gradient update can be understood as using a gradient descent-based optimization algorithm to calculate the gradient of the loss function with respect to the neural network parameters, and then making small adjustments to the parameters along the inverse direction of the gradient to gradually reduce the value of the loss function.
[0073] For example, similar to the aforementioned pre-training process, the loss value can be calculated using the absolute mean error, and the network parameters can be updated with the goal of minimizing the model response bias.
[0074] Step S303: Based on the corrected adjustable model parameters, update the humanoid robot single rigid body dynamics model, and recalculate the model predictive control optimization problem based on the updated humanoid robot single rigid body dynamics model to obtain the current corrected control quantity.
[0075] It should be noted that the "updating" in updating the humanoid robot's single-rigid-body dynamics model does not mean changing the fundamental physical model. Rather, it refers to replacing the old parameters within the adaptive neural network used to represent the lumped uncertainty perturbation term in the original single-rigid-body dynamics model with the corrected, adjustable model parameters. This instantly enhances the predictive power of the entire dynamics model. After updating the neural network parameters and obtaining a more accurate system model, steps S202 to S205 can be re-executed. That is, based on the same current system state, but using the updated, more accurate dynamics model as equality constraints, the MPC optimization problem is reconstructed and solved.
[0076] For example, the MPC controller updates the system model in real time based on the neural network output, as shown below: The current corrected control quantity is calculated based on this model.
[0077] In this embodiment, by explicitly using the deviation between the model's predicted state and the actual observed state as a driving signal input to the adjustable part of the neural network, a clear and unannotated optimization objective is provided for online learning. This solves the problem of complex error signal construction or reliance on prior assumptions in traditional adaptive control, enabling the model to accurately perceive its own prediction errors and make targeted corrections. Utilizing a very small amount of real-time collected interaction data to perform online gradient updates on the neural network parameters achieves rapid, incremental fine-tuning of the model parameters. This solves the problem that traditional methods require large amounts of data for retraining and cannot meet the real-time requirements of robot control, allowing the system to quickly adapt to the current real dynamics using instantaneous feedback information. Based on the fine-tuned neural network parameters, the entire single-rigid-body dynamics model is immediately updated, and the model predictive control optimization problem is resolved based on a more accurate model. The latest knowledge obtained from online learning is seamlessly and instantly transformed into the optimization basis for control decisions, solving the problems of the learning module being disconnected from the control module and model updates lagging behind control decisions. This achieves a rapid response closed loop from error perception to learning correction and then to control replanning.
[0078] In one implementation, step S40 includes: step S401, constructing a whole-body control optimization problem, wherein the optimization objective function corresponding to the whole-body control optimization problem includes multiple task tracking error terms, joint acceleration penalty terms, joint torque penalty terms, and tracking deviation penalty terms corresponding to the current corrected control quantity.
[0079] It should be noted that the whole-body control optimization problem refers to a mathematical optimization problem constructed after obtaining high-level motion commands from the adaptive MPC output, in order to generate low-level commands that can directly drive the motion of all joints. Its decision variables can include joint acceleration, joint torque, etc. The optimization objective function can be composed of a weighted sum of multiple penalty terms, used to measure the overall control performance. The task tracking error term is a component of the objective function, used to penalize the deviation between the robot's actual motion and multiple desired tasks. Tasks can include tracking the center of mass trajectory, body posture, foot swing trajectory, etc. Each task corresponds to one error term. The joint acceleration penalty term is another component of the objective function, used to penalize the magnitude of joint acceleration, aiming to smooth joint motion and reduce shock and mechanical vibration. The joint torque penalty term is yet another component of the objective function, used to penalize the magnitude of joint output torque, aiming to optimize energy distribution and prevent actuator saturation. The tracking deviation penalty term corresponding to the current corrected control quantity is the core term connecting the upper MPC and the lower WBC. It refers to adding a term to the objective function to penalize the deviation between the contact force or other related variables actually calculated by the whole-body control and the "current corrected control quantity" output by the upper MPC. This makes the whole-body control layer execute the instructions of the upper MPC as faithfully as possible.
[0080] Step S402: Establish constraint conditions based on the multi-rigid-body dynamics equations of the humanoid robot, the contact kinematic constraints between the feet and the ground, the joint torque limit constraints, the joint position limit constraints, and the friction cone constraints of the contact force information.
[0081] It should be noted that the kinematic constraints of the foot-to-ground contact describe the kinematic conditions that the robot's foot must satisfy when in contact with the ground. For example, when the foot is planned to be stationary on the ground, its velocity relative to the ground must be zero. Joint torque limit constraints limit the maximum and minimum torque that each joint motor can output; these are the physical boundaries of the hardware. Joint position limit constraints limit the range of rotation angles for each joint, determined by the mechanical structure, to prevent self-collision or damage. The friction cone constraint for contact force information describes the physical conditions that the contact force between the foot and the ground must satisfy; that is, the normal component of the contact force must be pressure, and the magnitude of the tangential friction force cannot exceed the product of the normal force and the coefficient of friction to ensure that the foot does not slip. This can be represented by a conical feasible region.
[0082] For example, the whole-body control optimization problem can be expressed as: st , , in, A full-body dynamics model of a humanoid robot. For joint angle, The inertia matrix, This includes the Coriolis force and the gravity vector. Select a matrix for the joint motor. To contact the Jacobian matrix; For the task The corresponding Jacobian matrix, For the task Acceleration command; This is the deviation term for the contact force output by the adaptive neural network MPC; , , , This is the weight matrix; , , These are contact force, joint torque, and joint position constraint, respectively.
[0083] Step S403: Based on the constraints, the whole-body control optimization problem is transformed into a quadratic programming form and solved to obtain joint control commands.
[0084] It should be noted that the objective function corresponding to the quadratic programming form is a quadratic function of the decision variables, and all constraints are linear equations or inequalities of the decision variables. A quadratic programming solver can be called to perform numerical calculations on the transformed problem, obtaining a set of definite decision variable values that minimize the objective function and satisfy all constraints, specifically joint acceleration, joint torque, etc.
[0085] For example, the principle block diagram of humanoid robot data and model fusion driving whole-body control is shown in Figure 3. Furthermore, the above WBC optimization problem can be transformed into a convex quadratic program (QP) problem and solved using a QP solver.
[0086] In this implementation, a multi-objective optimization function is constructed, including a penalty term for tracking deviations in upper-level MPC output commands. This function unifies the precise execution of high-level commands with multiple sub-objectives such as optimizing joint smoothness and energy consumption within a single framework for collaborative optimization. This solves the problem of competition among control objectives and the potential for neglecting certain aspects in traditional priority allocation methods. It achieves a balance between faithfully reflecting the upper-level motion intent and ensuring the quality and efficiency of lower-level execution. Based on precise full-body multi-rigid-body dynamics equations and a complete set of physical constraints such as foot contact kinematics, joint limits, and friction cones, the constraints of the optimization problem are established. The robot's complex physical model, hardware performance boundaries, and the fundamental physical laws governing environmental interaction are directly encoded into hard constraints for the optimization problem. This solves the fundamental problem that control commands may violate dynamic laws, exceed actuator capabilities, or lead to motion instability. From an algorithmic perspective, it ensures that any generated command has theoretical physical feasibility and system safety. By systematically transforming the complex constrained optimization problem into a standard quadratic programming form and calling a dedicated solver for efficient numerical solution, the complex whole-body motion generation problem is transformed into a convex optimization problem that can be computed in real time and has reliable convergence. This enables the stable and reliable generation of whole-body joint control commands within the control cycle, thereby achieving robust and adaptive whole-body motion control in uncertain environments.
[0087] Simulation results are provided here, as shown in Figure 4. Ground obstacles can be randomly generated in the Mujoco simulation environment, and data can be collected from the robot under different obstacle conditions, such as quantity, size, thickness, placement position, and placement angle, for offline meta-learning training. Simulation results for a completely new obstacle environment are shown in Figures 5 and 6. It can be seen that the robot "Monkey King" exhibits good posture and trajectory stability in the new obstacle environment. The above simulation results verify the effectiveness of the method described in this application.
[0088] Based on the same inventive concept, as shown in Figure 7, this application also provides a whole-body control device for a humanoid robot. The whole-body control device for the humanoid robot includes: a model building module 10, used to establish a single rigid body dynamic model of the humanoid robot based on model uncertainty and external disturbance mechanism; a preliminary control module 20, used to obtain the current initial control quantity based on the single rigid body dynamic model of the humanoid robot during the operation of the humanoid robot, through a model adaptive predictive controller, wherein the model adaptive predictive controller includes an adaptive neural network model; a control correction module 30, used to fine-tune the adjustable parameters in the adaptive neural network model based on the current initial control quantity, so as to dynamically correct the control quantity output by the single rigid body dynamic model of the humanoid robot, and obtain the current corrected control quantity; and an instruction generation module 40, used to perform whole-body control optimization calculation based on the current corrected control quantity, and generate joint control instructions.
[0089] It should be noted that the humanoid robot full-body control device provided in this application embodiment and the humanoid robot full-body control method provided in this application embodiment are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned humanoid robot full-body control method, and the repeated parts will not be described again.
[0090] In some embodiments, an electronic device provided in this application includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the above-described method for controlling the whole body of a humanoid robot.
[0091] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.
[0092] Memory can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0093] This application also provides a non-transitory storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for full-body control of a humanoid robot. This storage medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not be assembled into that device / apparatus / system. The aforementioned non-transitory storage medium carries one or more programs, which, when executed, implement the method as described in the embodiments or implementations of this application.
[0094] According to embodiments of this application, a non-transitory storage medium can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. A computer-readable signal medium can also be any storage medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.
[0095] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0096] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for controlling the whole body of a humanoid robot, characterized in that, The method includes: establishing a single-rigid-body dynamics model of a humanoid robot based on model uncertainties and external disturbance mechanisms; during the operation of the humanoid robot, obtaining the current initial control quantity based on the single-rigid-body dynamics model of the humanoid robot through a model adaptive predictive controller, wherein the model adaptive predictive controller includes an adaptive neural network model; fine-tuning the adjustable parameters in the adaptive neural network model based on the current initial control quantity to dynamically correct the control quantity output by the single-rigid-body dynamics model of the humanoid robot, thereby obtaining the current corrected control quantity; and performing whole-body control optimization calculations based on the current corrected control quantity to generate joint control commands.
2. The method as described in claim 1, characterized in that, The steps for establishing a single-rigid-body dynamics model of a humanoid robot based on model uncertainty and external disturbance mechanisms include: establishing a basic dynamics model based on the single-rigid-body dynamics equations of the humanoid robot; introducing a lumped uncertainty disturbance term into the basic dynamics model, which is used to characterize system model uncertainty, external disturbances, and environmental changes; representing the lumped uncertainty disturbance term using a multilayer perceptron to obtain an initial disturbance model; pre-training the initial disturbance model using a two-layer meta-learning framework to obtain a target disturbance model, wherein the two-layer meta-learning framework includes an adaptive layer and a meta-update layer; and combining and discretizing the basic dynamics model and the target disturbance model to obtain the single-rigid-body dynamics model of the humanoid robot.
3. The method as described in claim 2, characterized in that, The step of pre-training the initial perturbation model using a two-layer meta-learning framework to obtain the target perturbation model includes: defining a task space, which includes multiple tasks, each corresponding to a specific perturbation condition or environmental condition; sampling multiple sampling tasks from the task space, and for each sampling task, obtaining a corresponding support dataset and query dataset; calculating the first loss of the initial perturbation model under the current task using the support dataset, and obtaining the inner layer adaptive parameters of the current task through gradient update; calculating the second loss based on the inner layer adaptive parameters of the current task and the query dataset corresponding to the current task; aggregating the second losses of all sampling tasks, and updating the original model parameters of the initial perturbation model through gradient descent to obtain the outer layer updated model parameters; using the outer layer updated model parameters as the starting point for the next round of inner layer adaptation for iterative training until a preset iteration termination condition is reached to obtain the target perturbation model.
4. The method as described in claim 1, characterized in that, The step of obtaining the current initial control quantity through a model adaptive predictive controller based on the humanoid robot's single-rigid-body dynamics model during operation includes: obtaining the current system state and current control input of the humanoid robot in each control cycle; constructing a model predictive control optimization problem based on the humanoid robot's single-rigid-body dynamics model, the current system state, and the current control input; transforming the model predictive control optimization problem into a standard numerical optimization problem; solving the transformed optimization problem using a numerical optimization algorithm to obtain the optimal control input prediction sequence for multiple future times from the current time; and extracting the first control quantity corresponding to the current time from the optimal control input prediction sequence as the current initial control quantity.
5. The method as described in claim 4, characterized in that, The steps of constructing a model predictive control optimization problem based on the humanoid robot's single-rigid-body dynamics model and the current system state and control input include: constructing an objective function for rolling optimization within a finite prediction time domain, wherein the objective function is the weighted sum of tracking error and control energy consumption at all times within the prediction time domain, where the tracking error term is a weighted quadratic form of the difference between the predicted state and the desired reference state, and the control energy consumption term is a weighted quadratic norm of the control input vector; establishing the discrete-time form corresponding to the humanoid robot's single-rigid-body dynamics model as the equality constraints of the optimization problem, wherein the equality constraints include a linear dynamic system model with disturbance terms; and establishing inequality constraints regarding the future predicted system state and control input based on the robot's physical constraints.
6. The method as described in claim 4, characterized in that, The step of fine-tuning the adjustable parameters in the adaptive neural network model based on the current initial control quantity to dynamically correct the control quantity output by the humanoid robot single-rigid-body dynamics model and obtain the current corrected control quantity includes: inputting the current system state, the current control input, and the deviation between the system state predicted by the humanoid robot single-rigid-body dynamics model at the next moment and the system state actually observed at the next moment into the adjustable part of the adaptive neural network model; performing one or more gradient updates on the adjustable model parameters based on real-time interactive data with the goal of minimizing the deviation to obtain the corrected adjustable model parameters; updating the humanoid robot single-rigid-body dynamics model based on the corrected adjustable model parameters, and recalculating the model predictive control optimization problem based on the updated humanoid robot single-rigid-body dynamics model to obtain the current corrected control quantity.
7. The method as described in claim 1, characterized in that, The step of performing whole-body control optimization calculations based on the currently corrected control quantity to generate joint control commands includes: constructing a whole-body control optimization problem, wherein the objective function corresponding to the whole-body control optimization problem includes multiple task tracking error terms, joint acceleration penalty terms, joint torque penalty terms, and tracking deviation penalty terms corresponding to the currently corrected control quantity; establishing constraint conditions based on the humanoid robot's whole-body multi-rigid-body dynamics equations, contact kinematic constraints between the feet and the ground, joint torque limit constraints, joint position limit constraints, and friction cone constraints of contact force information; and transforming the whole-body control optimization problem into a quadratic programming form and solving it based on the constraint conditions to obtain the joint control commands.
8. A full-body control device for a humanoid robot, characterized in that, The humanoid robot's whole-body control device includes: a model building module for establishing a single-rigid-body dynamic model of the humanoid robot based on model uncertainties and external disturbance mechanisms; a preliminary control module for obtaining the current initial control quantity based on the single-rigid-body dynamic model of the humanoid robot during operation, through a model adaptive predictive controller, wherein the model adaptive predictive controller includes an adaptive neural network model; a control correction module for fine-tuning the adjustable parameters in the adaptive neural network model based on the current initial control quantity, so as to dynamically correct the control quantity output by the single-rigid-body dynamic model of the humanoid robot and obtain the current corrected control quantity; and an instruction generation module for performing whole-body control optimization calculations based on the current corrected control quantity to generate joint control instructions.
9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the whole-body control method for a humanoid robot as claimed in any one of claims 1 to 7.
10. A non-transitory storage medium, characterized in that, The non-transient storage medium stores a computer program, which, when executed by a processor, implements the steps of the whole-body control method for a humanoid robot as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Quadruped robot anti-disturbance motion control method based on cost weight adaptive mechanism
CN120973033A
Series-parallel robot self-adaptive motion control method and system
CN121187140A
Multi-degree-of-freedom mechanical arm control method based on quantum particle swarm optimization of migration strategy
CN121492006A