Robot control method, device and equipment and storage medium
By using a data-driven model predictive controller (DD MPC) to predict robot input data, the problems of slow response and instability in multivariable handling of PID controllers are solved, resulting in faster and more stable robot control.
Patent Information
- Application Number
- CN202410627919.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-11-21
AI Technical Summary
Existing PID controllers have slow response speeds in robot tactile servo systems, are sensitive to external interference and noise, cannot effectively handle multivariable systems, and have unstable control performance.
A data-driven model predictive controller (DD MPC) is adopted to predict the robot's input data by acquiring sample datasets, and control the robot by considering feedforward variables, thereby overcoming noise interference and meeting real-world constraints.
It achieves faster control response, improves the robustness and adaptive characteristics of the robot system, can control multiple variables simultaneously, and has stable output that is not affected by noise.
Smart Images

Figure CN120985624A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of robotics and automatic control, and in particular to a robot control method, device, equipment and storage medium. BACKGROUND
[0002] Haptic servoing is an effective method for safe interaction of robots with unknown environments. One of the core problems of haptic servoing is to robustly converge the contact features to the desired features through a carefully designed controller.
[0003] In the related art, a PID (Proportional Integral Differential) controller is used to achieve the task of haptic servoing. Illustratively, an object can move with the movement of a robot, and if the task of keeping the object balanced on the robot is to be completed, the haptic information of the object on the robot needs to be processed to obtain the position of the object on the robot, and then the velocity of the object is obtained through differential means, and the position of the object on the robot and the velocity of the object are taken as inputs of the PID controller to obtain a control amount output by the PID controller, and the control amount is used to control the movement of the robot to complete the task of keeping the object balanced on the robot.
[0004] However, in the above method, the PID controller only relies on the feedback variable of the robot and has no feedforward control, so the reaction speed is slow. SUMMARY
[0005] Embodiments of the present application provide a robot control method, device, robot and storage medium. The technical solutions provided by the embodiments of the present application are as follows:
[0006] According to an aspect of the embodiments of the present application, a robot control method is provided, the robot comprising at least one mechanical leg and a torso connected to the at least one mechanical leg, the torso moving in at least two degrees of freedom with the movement of the at least one mechanical leg, the method comprising:
[0007] obtaining a sample data set, the sample data set comprising at least one pair of sample input data and sample output data of the robot, the sample input data being used to control the movement of the at least one mechanical leg so that a first object is kept in a balanced state on the torso, and the sample output data being used to represent the pose of the robot and the first object after the movement of the at least one mechanical leg is controlled based on the sample input data;
[0008] predicting input data of the robot at the t-th time according to the sample data set, t being a positive integer;
[0009] control the movement of the at least one mechanical leg at the t-th moment based on the input data at the t-th moment, so that the first object is kept balanced on the torso.
[0010] According to an aspect of the embodiment of the present application, a robot control device is provided, the robot comprising at least one mechanical leg and a torso connected to the at least one mechanical leg, the torso moving in at least two degrees of freedom along with the movement of the at least one mechanical leg, the device comprising:
[0011] an acquisition module configured to acquire a sample data set, the sample data set comprising at least one pair of sample input data and sample output data of the robot, the sample input data being used to control the movement of the at least one mechanical leg so that a first object is kept in a balanced state on the torso, and the sample output data being used to represent the pose of the robot and the first object after the movement of the at least one mechanical leg is controlled based on the sample input data;
[0012] a prediction module configured to predict input data of the robot at a t-th moment according to the sample data set, t being a positive integer;
[0013] a control module configured to control the movement of the at least one mechanical leg at the t-th moment based on the input data at the t-th moment, so that the first object is kept balanced on the torso.
[0014] According to an aspect of the embodiment of the present application, a robot is provided, the robot comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the robot control method described above.
[0015] According to an aspect of the embodiment of the present application, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, the computer program being loaded and executed by a processor to implement the robot control method described above.
[0016] According to an aspect of the embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer readable storage medium. The processor of the robot reads the computer program from the computer readable storage medium, and the processor executes the computer program, so that the robot executes the robot control method described above.
[0017] The technical scheme provided by the embodiment of the present application can include the following beneficial effects:
[0018] The input data of the robot is predicted by obtaining a plurality of sample data pairs, input data at the t th moment is obtained, and the motion of the robot is controlled based on the predicted input data at the t th moment to complete the task of keeping the first object balanced on the robot. According to the sample data, the system state of the robot is predicted, the feedforward variable of the sample data is considered, not only the feedback variable of the robot system, the state of the robot can be predicted based on the sample data, and the robot system does not need to wait for the error to appear and then control, so the control response is faster. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is a flowchart of a robot control method provided by an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a balance task of a first object on a wheel-legged robot provided by an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a robot control method provided by an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a DD MPC (Data Driven Model Predictive Control) controller provided by an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of a three-dimensional coordinate system of a robot provided by an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of a two-dimensional coordinate system of a robot provided by an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of a mechanical leg solving method provided by an embodiment of the present application;
[0026] Figure 8 is a schematic diagram of a robot provided by another embodiment of the present application;
[0027] Figure 9 is a schematic diagram of experimental data of a PID controller provided by an embodiment of the present application;
[0028] Figure 10 is a schematic diagram of experimental data of a PID controller provided by another embodiment of the present application;
[0029] Figure 11 is a schematic diagram of experimental data of a DD MPC controller provided by an embodiment of the present application;
[0030] Figure 12 is a block diagram of a mechanical arm control device provided by an embodiment of the present application;
[0031] Figure 13 is a block diagram of a robot provided by an embodiment of the present application. DETAILED DESCRIPTION
[0032] The exemplary embodiments will be described in detail hereinbelow with reference to the drawings. In the following description, the same drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they only describe methods consistent with some aspects of the present application, as detailed in the appended claims.
[0033] Artificial intelligence (AI) is a theory, method, technology and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0034] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-training model technology, operation / interaction system, mechatronics, etc. Among them, the pre-training model is also called large model or basic model, which can be widely applied to downstream tasks in various directions of artificial intelligence after fine-tuning. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0035] With the research and progress of artificial intelligence technology, artificial intelligence technology has been researched and applied in many fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned vehicles, autonomous vehicles, drones, digital twins, virtual humans, robots, artificial intelligence generated content (AIGC, AI-Generated Content), conversational interaction, intelligent medical care, intelligent customer service, game AI, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0036] In the related art, a PID is used as a controller, the tactile information of the first object on the robot is processed to obtain the position of the first object, and then the velocity is obtained through differential means. The position and the velocity are taken as the inputs of the PID controller, and the rotation angle of the joint of the robot is taken as the output of the PID controller to complete the balancing task of the first object.
[0037] However, the method of using the PID controller to control the robot can cause the following problems:
[0038] (1) The PID controller is relatively sensitive to external interference and noise, and the control performance is not stable. (2) The PID controller can only process single variable conditions, and other control methods or multiple PID controllers are needed to control multiple variables. (3) The pure PID controller has no feedforward and the response is slow, and the PID controller only plays a control role when the error occurs. (4) The velocity and even the acceleration in the input signal of the PID controller are calculated through differential means, the error is large, and noise is introduced, so the control amount of the PID obtained according to the differential input signal will be very jittered. (5) The PID is a linear controller, and when the controlled system has a large nonlinear factor, the PID controller cannot control the controlled object.
[0039] A new robot control method is provided in the embodiments of the present application, a DD MPC controller is used to control the robot, which can overcome the above problems and achieve the balancing task of the first object on the robot. The embodiments of the present application can achieve the following effects: (1) The DD MPC controller considers the interference of noise, has better adaptive characteristics and robustness, and the output quantity will not become jittered because of the noise of the input. (2) The DD MPC controller can control multiple controlled variables at the same time. (3) The DDMPC can predict the future state of the system according to the historical data, not only relying on the feedback variables of the system, so the control response of the DD MPC is faster. (4) The DD MPC can consider some real-world constraints, such as the upper and lower limits of the joint position of the robot, the upper and lower limits of the joint speed of the robot, the upper and lower limits of the joint acceleration of the robot, etc. The control variable obtained by the controller meets the real-world constraints.
[0040] The execution subject of each step of the method provided in the embodiments of the present application can be a robot, which refers to an electronic device with data calculation, processing and storage capabilities. The robot provided in the embodiments of the present application can be applied to industrial (such as industrial robots), service (such as serving robots), entertainment (such as performance robots), medical (such as medical robots) and other scenes, which are not limited in the embodiments of the present application.
[0041] The scheme provided by the embodiments of the present application relates to the automatic control of artificial intelligence and the like, and can realize the control of a robot. The embodiments are specifically described as follows.
[0042] Please refer to Figure 1 which shows a flowchart of a robot control method provided by an embodiment of the present application. In the embodiment, the method is exemplarily applied to the robot introduced above. The method can include at least one step in 110-130.
[0043] In step 110, a sample data set is obtained, the sample data set including at least one pair of sample input data and sample output data of the robot, the sample input data being used to control the movement of at least one mechanical leg so that the first object is kept in a balanced state on the torso, and the sample output data being used to represent the pose of the robot and the first object after the movement of at least one mechanical leg is controlled based on the sample input data.
[0044] In some embodiments, the robot is a mechanical device controlled based on AI. In some embodiments, the robot can have many forms, for example, the robot can be a mechanical arm, a wheel-foot robot, a mechanical dog, or the like. In some embodiments, the robot described above can be understood as all components of the robot, or can be understood as part of the components of the robot. Exemplarily, all components of the robot can be controlled to complete the balancing task of the first object on the robot, or only part of the components of the robot can be controlled to complete the balancing task of the first object on the robot.
[0045] In some embodiments, the robot includes at least one mechanical leg and a torso connected to the at least one mechanical leg, the torso moving in at least two degrees of freedom with the movement of the at least one mechanical leg.
[0046] In some embodiments, the sample data set includes sample data (including sample input data and sample output data) obtained by simulating the movement of the robot.
[0047] In some embodiments, for the t-th moment, a pair of historical data including historical input data and historical output data of a plurality of continuous historical moments before the t-th moment is obtained; and the pair of historical data of the plurality of continuous historical moments is uniformly sampled to obtain the sample data set. In some embodiments, the pair of historical data of the plurality of continuous historical moments can also be randomly sampled to obtain the sample data set.
[0048] In some embodiments, for a current time t, a pair of historical data of N time points before the current time t is obtained. In some embodiments, for any time t, a pair of historical data of N time points before the time t is obtained. In some embodiments, the N time points can be consecutive N time points or non-consecutive N time points, which are not limited in the present application.
[0049] In some embodiments, the time interval between any two consecutive time points in the N time points is the same. For example, N=3, wherein the time interval between time point 1 and time point 2 is the same as the time interval between time point 2 and time point 3.
[0050] In some embodiments, based on the input data, the motion of the robot is controlled, and during the motion of the robot, the first object remains balanced on the torso without falling. In some embodiments, the first object can change its relative position with the torso along with the motion of the robot. The category and shape of the first object are not limited in the present application. For example, the first object can be a cylindrical object such as a bottle, or a spherical object such as a ping-pong ball.
[0051] In some embodiments, the input data can include one or more data, which are not limited in the present application. For example, the input data can include the rotation angle of one or more joints. In some embodiments, the output data can include one or more data, which are not limited in the present application. For example, the output data can include one or more of the following: the included angle between the torso and the bearing surface, the position of the first object on the torso, and the rotation angle of one or more joints of the robot.
[0052] Step 120, according to the sample data set, predicting the input data of the robot at the t-th time point, t being a positive integer.
[0053] In some embodiments, according to the sample data set, the input of the robot at the current time t is predicted to obtain the input data of the robot at the t-th time point. In some embodiments, a DD MPC controller is used to predict the input of the robot at the current time t according to the sample data set to obtain the input data of the robot at the t-th time point. In some embodiments, the input data at the t-th time point can be one or more of the parameters for controlling the motion of the robot, and based on the input data at the t-th time point, the motion of the robot can be determined. For example, the input data at the t-th time point can be a torque or a rotation angle of a joint of the robot.
[0054] Step 130, based on the input data at the t-th time point, controlling the motion of at least one mechanical leg at the t-th time point to keep the first object balanced on the torso.
[0055] In some embodiments, for the current time t, the robot is in the first configuration, the robot is controlled to move to the second configuration according to the input data at the t time, and in the process, the first object is balanced on the torso. In some embodiments, the first object also moves relative to the robot as the robot moves.
[0056] It should be noted that the movement of the robot in the embodiments of the present application refers to the movement of the robot relative to the bearing surface. In the process of movement of the robot, the first object also moves relative to the bearing surface. However, due to the change of the angle of the robot relative to the bearing surface, the force condition of the first object changes, and the first object can also move relative to the robot.
[0057] Exemplarily, as shown in Figure 2 The first object 210 is located on the torso 221 of the robot 220, at this time the robot is in the first configuration, the four mechanical legs 222-225 move based on the input data at the t time, accordingly, the relative position of the torso 221 and the bearing surface on which the robot 220 is located changes, and the first object 210 also moves with the movement of the torso.
[0058] The technical scheme provided in the embodiments of the present application obtains a plurality of sample data pairs, predicts the input data of the robot, obtains the input data at the t time, controls the movement of the robot based on the predicted input data at the t time, and completes the task of balancing the first object on the robot. According to the sample data, the system state of the robot is predicted, the feedforward variable of the sample data is considered, not only the feedback variable of the robot system is relied on, the state of the robot can be predicted based on the sample data, without waiting for the error to occur and then controlling the robot system, so the control response is faster.
[0059] In some embodiments, the robot can be regarded as a linear time-invariant system (LTI system), and the basic properties of the LTI system include linearity (homogeneity and additivity), time invariance, differentiality, and integrality. In some embodiments, due to the time invariance of the LTI system, the parameters of the robot do not change over time, and thus, when the feedback coefficient is known, the input data of the robot can be determined based on the system state of the robot system, and the corresponding output data can be obtained. Conversely, when the input data and the output data of the robot system and the system state of the robot system are known, the feedback coefficient (or referred to as the unit impulse response) can be solved. In the embodiments of the present application, the robot is regarded as an LTI system, and the process of determining the input data of the robot at the t th time in the embodiments of the present application can be regarded as the process of solving the feedback coefficient. Since the errors and noises in reality will affect the robot, different sample data may not be the same as the feedback coefficient solved, and thus, the constraints of the real conditions need to be considered in the process of solving the feedback coefficient, and the feedback coefficient needs to be adjusted based on the feedback of the robot (the output data of the robot in the second form after the movement based on the input data at the t th time) and the reference state of the robot. The feedback coefficient is actually a feedback coefficient sequence, and for the sake of simplicity of description, the feedback coefficient is referred to as the feedback coefficient in the embodiments of the present application, and can also be referred to as the feedback coefficient sequence.
[0060] The robot control method provided in the embodiments of the present application can regard the robot system as an LTI system to predict the input data of the robot at the t th time based on sample data. Exemplarily, Figure 3A working flow chart of the DD MPC controller provided by an embodiment of the present application is given. 1. Collect a system trajectory with length N; 2. Form a Hankel matrix from the system trajectory; 3. Decompose the first n rows and the last L columns of the Hankel matrix, the first n rows are used to form the terminal equality constraint, and the last L columns are used to form the Hessian and Gradient matrices in the quadratic programming problem, and the Reference and RQ penalty weight matrices are substituted into the loss function and the terminal equality constraint to form a quadratic programming problem about a; 4. Solve the a that minimizes the loss function and satisfies the equality constraint by using a quadratic programming solver (such as qpOASES); 5. Take the corresponding input and output trajectories of the Hankel matrix equation with a, and take the input data u at the t-th time point; 6. Send the input data u at the t-th time point to the robot for execution; 7. Take the first n input and output trajectory points to update the terminal equality constraint as feedback; 8. Set t = t + 1, and re-execute 4 until the system reaches the reference state. The reference state here is a pre-set state, which is set based on the control target of the robot. For example, the control target of the robot is to keep the first object balanced on the torso, and the reference state can be an ideal balanced state of the first object on the torso, such as a state in which the first object is located at the midpoint of the torso.
[0061] The derivation method of the prediction process of the robot system is also given in the embodiments of the present application. The robot system can be regarded as an LTI system as shown below:
[0062]
[0063] wherein a refers to a feedback coefficient, refers to the input data at the t-th time point, refers to the output data at the t-th time point, H L (u d ), H L (y d ) is a Hankel matrix, L refers to the prediction step length of the robot, u d , y d refers to a sample trajectory of a piece of L+n order sustainability excitation of the robot system. A piece of sample trajectory of sustainability excitation indicates that the system state and properties represented by this piece of trajectory are smooth, i.e., the future trajectory points with length L (mapped to the first n rows and the last L rows of the matrix) can be predicted by the first n trajectory points (trajectory points are also sample data pairs).
[0064] The above formula can be regarded as a convolution and expression of a discrete LTI system in the time domain, and the meaning of the formula can be understood as follows: if there is an output after multiplying any a with the Hankel matrix, it is a certain trajectory of an LTI system The above formula implicitly expresses the model of the system through the sample data of the LTI system, so as to replace M in the MPC, that is, the model, by the sample data.
[0065] It should be noted that in the embodiments of the present application, the input data or output data at a time point is referred to as a trajectory.
[0066]
[0067]
[0068] x is sample data (which can be sample input data or sample output data), x N-L N-Lth sample data, and N is the number of sample data.
[0069] In some embodiments, the Hankel matrix has a dimension of (m*L+m*n) x (N-L-n+1). Wherein, m is the number of types of sample data, and n is the system order of the robot.
[0070] In some embodiments, the above step 120 can be implemented as at least one of the following steps 121-123 (not shown in the figure).
[0071] Step 121, determining a condition function and a loss function of the robot according to the sample data set, the condition function being used to constrain the input data and the output data of the robot, and the loss function being used to measure the difference degree between the data at the tth time point and the reference data, the data at the tth time point including the input data at the tth time point and the output data at the tth time point predicted based on the sample data set, and the reference data including the input data and the output data when the robot and the first object are in a reference state.
[0072] In some embodiments, the condition function is used to describe the reality condition required to be met by the robot. In some embodiments, the loss function is used to describe the difference degree between the predicted data and the reference data.
[0073] In some embodiments, when the robot is in the reference state, the input data of the robot is 0, the robot does not move, that is, the output data of the robot does not change relative to the output data of the previous time. Or when the robot is in the reference state, the input data of the robot is 0, the output data of the robot does not change with time, that is, the pose of the robot and the first object does not change with time. Taking the movement of the first object on the torso as an example, the reference state can be that the torso is parallel to the horizontal plane, and the first object is located at the midpoint of the torso, and the plane formed by the centroid position of the first object and the midline of the torso is perpendicular to the horizontal plane. Of course, the first object can be located at any point on the torso, and the plane formed by the centroid position of the first object and the tangent point of the first object and the torso is perpendicular to the horizontal plane.
[0074] Step 122, determining the feedback coefficient of the robot according to the condition function and the loss function, the feedback coefficient being used to represent the feedback of the robot to the input data at the t th time.
[0075] In some embodiments, the loss function and the condition function are both converted into functions about a, and the entire quadratic programming problem can obtain an a that minimizes the loss function and satisfies the equality constraint.
[0076] Step 123, predicting the input data of the robot at the t th time according to the feedback coefficient.
[0077] In some embodiments, the input data of the robot at the t th time is predicted according to the feedback coefficient and the sample data set.
[0078] In some embodiments, the first matrix is determined according to the sample data set, the first matrix including at least one sample input data and at least one sample output data; and the input data of the robot at the t th time is predicted according to the feedback coefficient and the first matrix.
[0079] In some embodiments, the first matrix includes a second matrix and a third matrix, the second matrix including at least one sample input data, and the third matrix including at least one sample output data.
[0080] In some embodiments, the first matrix is the Hankel matrix on the left side of the Hankel matrix equation shown in the above LTI system, and the input data at the t th time is the on the right side of the equation.
[0081] By the above method, the balance task of the first object on the robot is regarded as a solution task of a discrete LTI system, the feedback coefficient of the LTI system is solved, and the input data of the robot at the t th time is predicted based on the feedback coefficient, so that the scheme is simpler.
[0082] In some embodiments, exemplary methods for determining the condition function and the loss function are also provided in this application.
[0083] 1. Determine the condition function
[0084] In some embodiments, determining the condition function may include at least one of the following steps a to b.
[0085] Step a: Determine the second matrix based on at least one sample input data, and determine the third matrix based on at least one sample output data, wherein the elements in the second matrix and the third matrix are in one-to-one correspondence.
[0086] In some embodiments, sample input data is determined as elements of a second matrix, and sample output data is determined as elements of a third matrix.
[0087] In some embodiments, the (i-1)th to (NL-n+i-1)th sample input data from at least one sample input data are determined as the i-th row of the second matrix; the (i-1)th to (NL-n+i-1)th sample output data from at least one sample output data are determined as the i-th row of the third matrix; where i is a positive integer.
[0088] In some embodiments, the second matrix is H in the aforementioned LTI system. L (u d The third matrix is H in the aforementioned LTI system. L (y d ).
[0089] Step b: Determine the robot's condition function based on the first n rows of the second matrix and the first n rows of the third matrix, where n is the system order of the robot and n is a positive integer.
[0090] For example, such as Figure 4 As shown, the DD MPC controller is used to predict the robot's input data at time t by determining the loss function (6) and condition functions (7) to (10). After controlling the robot's movement based on the input data at time t, the robot's output data can also be used as feedback to adjust the loss function and condition function.
[0091] In some embodiments, since the condition function is used to describe the constraints of real-world conditions on the robot, the condition function may include one or more.
[0092] In some embodiments, the condition function is a function, and step b above can be implemented as step b1 below.
[0093] Step b1, determining a conditional function according to the first n rows in the second matrix, the first n rows in the third matrix, a noise variable, a first threshold value, a feedback coefficient and reference data, the conditional function indicating that the robot approaches the reference state over time, the noise variable (also referred to as a relaxation variable) being used to describe measurement noise, and the first threshold value being an upper limit value of the noise variable.
[0094] In some embodiments, the conditional function includes a first conditional function, a second conditional function, a third conditional function and a fourth conditional function, and the step b can be implemented as steps b2-b5.
[0095] Step b2, determining the first conditional function according to the noise variable, the noise variable being used to describe measurement noise, and the first conditional function being used to reduce the interference of the measurement noise on the input data at the tth moment.
[0096] In some embodiments, the noise variable is introduced due to the measurement noise in the real scene. The purpose of introducing the noise variable is to enable y with measurement noise to be substituted into the Hankel matrix equation (the LTI system) again to still guarantee that the equation is established (y in the Hankel matrix equation in the ideal state is without noise).
[0097] In some embodiments, the first conditional function is as follows:
[0098]
[0099] wherein σ(t) is the noise variable, is the input data at the tth moment, is the output data at the tth moment, α(t) is the feedback coefficient, H L+n (u d is the Hankel matrix composed of the sample input data, is the Hankel matrix composed of the sample output data.
[0100] Step b3, determining a second conditional function according to the first n rows in the second matrix and the first n rows in the third matrix, the second conditional function being used to describe the first n pairs of sample input data and sample output data.
[0101] In some embodiments, the second conditional function is used to express the following meaning: the -n to -1 sample input data sample output data of the LTI system are the first n sample data pairs of the LTI system, which can be understood as different descriptions of the same LTI trajectory with a length of n.
[0102] In some embodiments, the second conditional function is as follows:
[0103]
[0104] wherein, denotes the input data of the -th sample, denotes the output data of the -th sample, u [t-n,t-1] denotes the input data of the first n samples, denotes the output data of the first n samples.
[0105] Step b4, determining a third conditional function according to the first n rows in the second matrix, the first n rows in the third matrix and the reference data, the third conditional function representing that the robot approaches the reference state over time.
[0106] In some embodiments, the third conditional function is a constraint corresponding to a quadratic programming problem in a Data Driven MPC controller. The equality constraint here is called a terminal equality constraint, which is usually used to limit the final value of the optimization variable in the optimization process to be equal to a specific target value, for example, in a control problem, to make the system reach a specific target state. For example, in the embodiments of the present application, to make the robot approach the reference state.
[0107] In some embodiments, the third conditional function is as follows:
[0108]
[0109] wherein, denotes the input data of the -th sample, denotes the output data of the -th sample, denotes the equilibrium point of the LTI system, s represents the equilibrium point, and n represents writing the equilibrium point into a column vector with a length of n.
[0110] Since the trajectory at future time points t+L-n to t+L-1 is unknown, it can only be predicted according to the sample data of the sustainability incentive based on the properties of the LTI system. Therefore, in the control process, the trajectory of the first n points at the current time is updated in real time to update this equality constraint. The "terminal" in the terminal equality constraint can be understood as the state that the system finally reaches: the equilibrium point. The terminal equality constraint can be written in the form of a corresponding hankel matrix multiplied by a according to the hankel matrix equation of the LTI system, and then the terminal equality constraint is converted into an equation about a.
[0111] In some embodiments, the equilibrium point described above refers to the reference state.
[0112] In some embodiments, the reference state at each time point is the same.
[0113] Step b5, determining a fourth conditional function according to the noise variable, the first threshold value and the feedback coefficient, the first threshold value being an upper limit value of the noise variable, the fourth conditional function being used to constrain process convergence of the input data at the tth time point.
[0114] In some embodiments, the fourth conditional function is shown in the following formula:
[0115]
[0116] wherein σ k (t) is the noise variable, is the upper limit value of the noise variable, i.e. the first threshold value, and a(t) is the feedback coefficient.
[0117] In some embodiments, when λ σ is large enough, the fourth conditional function above is absolutely satisfied because the regularization term of σ σ becomes very small. Therefore, in the quadratic programming problem, this inequality constraint is not considered. λ σ is a penalty weight for the noise variable.
[0118] In some embodiments, since the fourth conditional function above is absolutely satisfied, the first conditional function and the second conditional function are equalities, and therefore the first conditional function and the second conditional function can be brought into the third conditional function in the form of an equality transformation to obtain a conditional function. When determining the input data at the tth time point, only the conditional function needs to be calculated, thereby reducing the calculation amount in the solving process and improving the calculation efficiency.
[0119] 2. Determining a loss function
[0120] In some embodiments, the loss function of the robot is determined according to the last L rows in the second matrix and the last L rows in the third matrix, L being a prediction step length of the robot, and L being a positive integer.
[0121] In some embodiments, determining the conditional function can include at least one of the following steps a-c.
[0122] Step a, determining a first norm according to the last L rows in the second matrix and the last L rows in the third matrix; wherein the first norm includes a second-order square norm of the last L sample input data and a second-order square norm of the last L sample output data.
[0123] Step b, determining a first penalty term according to the first penalty weight, the first threshold value and a first regularization term, the first regularization term being a regularization penalty for the feedback coefficient, the first penalty weight being a penalty weight for the first regularization term, and the first threshold value being an upper limit value of the noise variable, the noise variable being used to describe measurement noise.
[0124] Step c, determining a second penalty term according to the second penalty weight and a second regular term, the second regular term being a regularization penalty for the noise variable, the second penalty weight being a penalty weight for the second regular term; determining a loss function according to the first norm, the first penalty term and the second penalty term.
[0125] In some embodiments, the first n pairs of sample data of the robot are used to predict the L pairs of input data and output data of the robot after the t time.
[0126] In some embodiments, the loss function is as follows:
[0127]
[0128]
[0129] wherein, is the square of the second norm of the input data and the output data and their corresponding equilibrium points, R is a penalty weight matrix of the square of the second norm of the input data and the equilibrium point, and Q is a penalty weight matrix of the square of the second norm of the output data and the equilibrium point.
[0130] is a regularization penalty for a, which is to prevent overfitting in the process of solving the quadratic programming problem and to reduce the error of the Hankel matrix equation. And λ α is a penalty weight for the regular term, is an upper limit value of the noise variable.
[0131] is a regularization penalty for the noise variable σ. And λ σ is a penalty weight for the regular term. The noise variable is often used in optimization problems to change the inequality constraint into an equality constraint, so that the feasible solution domain of the optimization problem is larger and easier to solve. Finally, the Hankel matrix equation that can implicitly represent the LTI system model is replaced by the data sequence of u and y in the loss function, so the last L rows of the Hankel matrix are taken here to ensure that the matrix dimensions on the left and right of the equation are correct, and the loss function is converted into an equation about a.
[0132] Through the above method, the constraint condition function and the loss function are determined based on the constraints of the real conditions, so that the input data at the t time obtained by prediction can meet the real constraint conditions. In addition, the noise variable is used to describe the influence of the measurement noise on the output data, considering the interference of the noise, having better adaptive characteristics and robustness.
[0133] In some embodiments, the process of deducing the type of input data and the type of output data of the robot needs to be determined in combination with the morphology of the robot, and different morphologies of the robot may correspond to different deducing processes. Next, the deducing process will be exemplarily described taking a wheel-legged robot as an example.
[0134] I. Inverse kinematics deduction
[0135] In some embodiments, the method of inverse kinematics can be used to deduce the input data of the robot, and the following embodiments are exemplarily described by the embodiments of the present application.
[0136] In some embodiments, according to the feedback coefficient and the first matrix, the motion parameters of the first object are determined, the motion parameters including at least one parameter affecting kinetic energy or potential energy; according to the motion parameters of the first object, the lengths corresponding to the at least one mechanical leg are determined, the length corresponding to the mechanical leg being the straight-line distance from the reference point of the mechanical leg to the intersection point of the robot and the bearing surface; according to the lengths corresponding to the at least one mechanical leg, the input data of the robot at the t time is determined; wherein the motion parameters include at least one of the following: the mass of the first object, the speed of the first object in the first direction, the acceleration of the first object in the first direction, the speed of the first object in the second direction, the acceleration of the first object in the second direction, the first direction and the second direction being two directions perpendicular to each other on the horizontal plane.
[0137] In some embodiments, according to the feedback coefficient and the first matrix, the motion parameters of the first object are determined. The motion parameters of the first object will be affected by the posture of the torso, such as the pitch angle and the roll angle of the torso, which will affect the moving speed of the first object in different directions. Similarly, the motion parameters of the first object can also reflect the posture of the torso in reverse, and the posture of the torso is more caused by the change of the length of the mechanical leg, so the length corresponding to the at least one mechanical leg can be determined based on the motion parameters of the first object. The length corresponding to the mechanical leg is controlled by the joint on the mechanical leg, so the input data corresponding to the mechanical leg can be inversely calculated based on the length corresponding to the mechanical leg. Correspondingly, the moving direction of the wheel foot will also affect the motion parameters of the first object to some extent, so the input data corresponding to the wheel foot can also be calculated by the same method.
[0138] In some embodiments, the first direction refers to the roll angle direction, and the second direction refers to the pitch angle direction.
[0139] In some embodiments, due to the different structures of different robots, for example, some robots correspond to one wheel foot for each mechanical leg, and some robots correspond to one wheel foot for multiple mechanical legs, the acquisition of the parameters may be slightly different, but they can be set based on the structure of the robot and will not affect the solving process introduced next.
[0140] Balance feedback control primarily involves feeding back self-balancing measurements to the control system to ensure the final balance measurement meets the standard. In this embodiment, self-balancing is measured using three values: pitch angle, yaw angle, and roll angle.
[0141] The roll angle is the angle of rotation about the x-axis, also called roll. In the embodiments of this application, it is used as... To express.
[0142] The pitch angle is the angle of rotation around the y-axis, also called pitch, and is represented by θ in this embodiment.
[0143] The yaw angle is the angle of rotation around the z-axis, also called yaw, and is represented by φ in the embodiments of this application.
[0144] The right-handed Cartesian coordinate system in three-dimensional space and its three measurement angles, such as Figure 5 As shown.
[0145] like Figure 6 As shown, a three-dimensional robot is projected onto a two-dimensional plane to form a simplified two-dimensional model, and the robot's balance is controlled based on this simplified model. In some embodiments, the robot's input data includes at least one of the following: input data corresponding to at least one wheeled leg and input data corresponding to at least one mechanical leg. Next, an exemplary description will be given using the determination of the input data corresponding to the wheeled leg as an example.
[0146] 1. Pitch direction
[0147] In some embodiments, the output data corresponding to the wheeled foot can be one or more of the following: the speed of the wheeled foot's center of movement, the angular velocity of the wheeled foot's center of movement, and the distance the wheeled foot's center of movement travels. In some embodiments, the input data corresponding to the wheeled foot can be one or more of the following: the speed of the wheeled foot's center of movement, the angular velocity of the wheeled foot's center of movement, and the input torque of the motor corresponding to the wheeled foot. In some embodiments, the above input data can be converted between each other.
[0148] For example, let X represent the distance the center of the wheeled foot moves laterally in a simplified two-dimensional planar model. Assuming the wheeled foot does not slip or leave the ground, the value of X is equal to the angle of rotation of the wheeled foot multiplied by the radius of the wheeled foot. Accordingly, using The speed at which the center of the wheel-like foot moves is represented by... This represents the reference speed value for the center movement of the wheeled leg. Let θ represent the robot's pitch angle, which is the angle of rotation about a direction perpendicular to the plane of the paper in a simplified two-dimensional model. Correspondingly, let... The angular velocity representing the pitch angle is denoted by θ. refdenotes the pitch angle reference value, and denotes the angular velocity reference value of the pitch angle. Denote the torque input to the robot wheeled foot motor as τ. Where θ and has a sensor IMU to obtain, obtained by the Encoder sensor of the wheeled foot. refers to the speed of the center of the wheeled foot moving in the reference state and the pitch angle in the reference state.
[0149] Exemplarily, As the output data of the robot at time t-1, based on update the first matrix and the feedback coefficient to determine the motion parameters of the first object. According to the motion parameters of the first object, determine the input data of the wheeled foot at time t. The input data at time t can be the predicted speed of the center of the wheeled foot moving, or the torque input to the wheeled foot motor. Exemplarily, As the output data of the robot at time t-1, based on update the first matrix and the feedback coefficient to determine the motion parameters of the first object. According to the motion parameters of the first object, determine the input data of the wheeled foot at time t. The input data at time t can be the predicted speed of the center of the wheeled foot moving, or the torque input to the wheeled foot motor.
[0150] 2, roll direction
[0151] In some embodiments, the roll angle in the reference state is In actual application, the roll angle in the reference state is often (indicating the plane on which the platform is located, which is perpendicular to the plane on which each mechanical leg is located), the real roll angle is obtained through sensors such as IMU and returned to the DD MPC controller. The DD MPC controller calculates the length of the mechanical leg that needs to be changed (Δl), and through the inverse kinematics solving module, the input data of the motor at time t is calculated.
[0152] If the given roll angle One leg is stretched and the other leg is contracted, and the contraction and stretching variables are the same, which is Δl. Now it is desired to obtain the change amount Δl of the two legs from the given .
[0153] The planar projection of the robot in the tilted state is shown in Figure 7 In triangle A1C1D, the length of DC1 is 0.5l0. And there is a right angle, so it can be deduced that the length change of the mechanical leg is as follows:
[0154]
[0155] where l0 is the width of the platform, Rolling angle, Δl is the length change of the mechanical leg.
[0156] 3. The relationship between the position of the wheeled foot and the position of the motor
[0157] This embodiment gives the inverse kinematics solving method of the robot, that is, the function of the joint angle position is solved given the position coordinates of the wheeled foot, which is used for subsequent control calculation.
[0158] Taking the upper part of the robot as the reference system, the coordinate origin is fixed on the midpoint of x1x5, and the coordinates of x1 and x5 are (0.5l0, 0) and (-0.5l0, 0) respectively. Now, given the wheel coordinates (x3, z3), four angles, θ 11 , θ 12 , θ 21 and θ 22 , are calculated as shown in Figure 7 .
[0159] Since the wheel coordinates (x3, z3) are known, and the value of x3 is arbitrary, the lengths of line segments l5 and l6 can be calculated given the known upper end points (x1, z1) and (x5, z5) of the robot, and the formula is as follows:
[0160]
[0161]
[0162] In triangle X1X2X3, the three sides l1, l2, and l5 are known, and according to the cosine law, the angle θ 11 can be calculated, and the formula is as follows:
[0163]
[0164] In triangle X1X3X5, the three sides l0, l5, and l6 are known, and according to the cosine law, the angles θ 12 and θ 21 can be calculated, and the formula is as follows:
[0165]
[0166]
[0167] In triangle X3X4X5, the three sides l3, l4, and l6 are known, and according to the cosine law, the angle θ 22 can be calculated, and the formula is as follows:
[0168]
[0169] Thus, the four angles of the upper end of the robot can be obtained, and the motor is turned to the corresponding angle, so that the wheeled foot can reach the position (x3, z3).
[0170] In the above embodiments, how to determine the input data of the wheeled foot of the robot at the t-th moment is introduced. Correspondingly, the input data of the mechanical leg of the robot at the t-th moment can be determined by the same or similar method, which will not be described herein.
[0171] By the above method, the balance task of the first object on the platform of the robot is simplified to the process of inverse kinematics solution, so that the scheme for predicting the input data of the robot at the t-th moment is simpler, the amount of data required in the calculation process is reduced, and the calculation pressure of the system is reduced.
[0172] In some embodiments, different robots can have different structures, and the corresponding inverse kinematics solution process is also different. In the above embodiments, an inverse kinematics solution process of a wheeled-legged robot is given. The inverse kinematics solution process of a robot with a different structure can refer to the above embodiments, simplify the robot into a simple dynamic structure, and perform the inverse kinematics solution process based on the dynamic structure. The technical scheme provided in the embodiments of the application can be applied to robots with different structures, and the inverse kinematics solution process is set based on the structure of the robot. The complex problem is simplified to a simple physical dynamic problem, the relationship between the input data and the output data of the robot can be simply and quickly solved, and the amount of data required for calculation in the prediction process is reduced.
[0173] II. In the scenario that the first object keeps balance on the robot, how to obtain the sample output data
[0174] In some embodiments, obtaining the sample data set can include at least one of steps 1-2.
[0175] Step 1: For the t-th moment, obtain the historical data pairs of a plurality of continuous historical moments before the t-th moment.
[0176] Step 2: Sample the historical data pairs of the plurality of continuous historical moments to obtain the sample data set.
[0177] In some embodiments, the historical data pairs of the plurality of continuous historical moments are uniformly sampled to obtain N historical data pairs at N moments, and the time interval between any two continuous moments in the N moments is the same.
[0178] In some embodiments, the historical data pairs of the plurality of continuous historical moments are randomly sampled to obtain N historical data pairs at N moments, and the time interval between any two continuous moments can be the same or different.
[0179] In some embodiments, the obtaining the sample dataset can comprise at least one of the following steps 1-4.
[0180] Step 1, obtaining at least one sample input data.
[0181] Step 2, for the jth sample input data in the at least one sample input data, determining the pose of the robot after moving based on the jth sample input data, j being a positive integer.
[0182] Step 3, based on the tactile sensor, obtaining the position of the first object on the torso.
[0183] Step 4, determining the jth sample output data according to the pose of the robot after moving based on the jth sample input data, and the position of the first object.
[0184] In some embodiments, the position of the first object on the torso is represented in the form of coordinates (x, y). For example, at time t1, the position of the first object on the torso is (x1, y1), and at time t2, the position of the first object on the torso is (x2, y2). Wherein, x refers to the distance of the first object in the x direction from the origin, and y refers to the distance of the first object in the y direction from the origin. It should be noted that the coordinates here are a two-dimensional coordinate system established on the torso. For example, taking the center of the torso as the origin, taking the direction of a straight line passing through the origin and perpendicular to one side of the torso as the x direction, and taking the direction passing through the origin and perpendicular to the x axis as the y direction, a two-dimensional coordinate system is established. For example, the torso is a rectangle, and one of the vertices of the rectangle is taken as the origin, and the two sides connecting the vertex are taken as the x axis and the y axis, respectively, and the direction of the side extension is taken as the positive direction.
[0185] In some embodiments, the pose of the robot after moving based on the jth sample input data comprises at least one of the following: the pose of the torso, the length corresponding to each of the at least one mechanical leg, the moving speed of the robot, and the moving direction of the robot.
[0186] In some embodiments, the pose of the torso comprises at least one of the following: the pitch angle of the torso, the roll angle of the torso, and the yaw angle of the torso.
[0187] Through the above method, the sample output data is determined based on the position of the first object on the torso and the pose of the robot after moving based on the jth sample input data, which is based on the structure of the robot. The torso of the robot is relatively flat and spacious, so a tactile sensor array can be arranged on the torso. The tactile sensor array can more accurately reflect the position of the object on the torso, making the output data more accurate. In some embodiments, a method combining tactile sensors and visual ranging technology can also be used to determine the position of the first object on the torso. This method is more suitable for irregularly shaped first objects.
[0188] III. Balance dynamics analysis
[0189] Next, the balance dynamics control of the first object on the torso will be explained. Take the robot shown in FIG. 8 as an example, the first object is a ball 810, and the goal of this embodiment is to adjust the orientation of the robot by controlling the joints on the four mechanical legs, thereby changing the angle of the torso 820 to achieve a stable balance, so as to maintain the balance of the first object 810 on the torso 820. Figure 8
[0190] In the experiment, the ball can roll in the two degrees of freedom of a x and a y , so more haptic features are needed to control the servo controller. Let c x and c y represent the contact coordinates of the ball on the haptic board, and are their respective velocities. In addition, in order to represent the dynamics of the ball balance system, the accelerations of the ball and are also needed. However, it is challenging to obtain the acceleration data of the ball during the experiment due to the lack of direct acquisition methods.
[0191] From the derivation of the system dynamics, there is a correlation between a x , a y to and , as follows: With this relationship, the embodiments of the present application combine the roll angle and the pitch angle of the torso in the two degrees of freedom of a x and a y into the state space representation respectively. This integration enables the embodiments of the present application to effectively manipulate the acceleration of the ball, thereby providing a powerful control strategy for the system. Since there is no torque control in the motor, the embodiments of the present application select the angular velocities of the torso in the roll and pitch directions, denoted by and , as the control input of the robot, because they can accurately adjust the acceleration of the ball.
[0192] With these variables, the dynamics of the ball balance problem can be expressed in the state space representation, where: and control input Here y is the state vector composed of the rolling motion state of the ball and the orientation of the torso, and the system control input u is composed of the angular velocities and Composition. To achieve the control input requirements, the incremental angular displacement of the corresponding torso in each direction is calculated at each discrete control time step. Subsequently, the corresponding commands for the four joints are determined using inverse kinematics, which are then transmitted to control the motion of the torso. In this embodiment, high-dimensional servoing is applied and the DDMPC matrix dimension is calculated with m = 2, p = 6 (u is a 2-row matrix and y is a 6-row matrix).
[0193] Prior to the online haptic servoing control based on DD MPC, offline past data must be collected. To ensure the system is continuously excited, a carefully selected data set is used, which includes sufficient information of the observable system states. The data set must provide sufficient information to capture the dynamics of the ball rolling. Although this approach does not require a stable data collection control strategy, considering the convenience and efficiency of real robot experiments, this application employs a rough manual adjustment feedback law to collect data. In addition, the collected data is sampled to obtain sufficient dynamic information in the 4-second ball rolling process. This reduction results in a significant reduction in data length to 100 or less, which enables the robot control board to solve the DDMPC algorithm within one control period. Therefore, the controller can be used online.
[0194] The embodiment of the application also evaluates the performance of the haptic servo controller based on PID and DDMPC in maintaining the ball balance under artificial disturbance through comparative experiments. In the first experiment, two different PID controllers are implemented, which are based on and control the ball in two directions. Due to the speed of the ball, the haptic feature is obtained, which, due to its highly dynamic nature, mainly represents the motion characteristics. In order to prevent the ball from falling off the torso, a high gain of the derivative term of the PID controller is essential. After a series of experiments, the fine-tuned PID controller proves its effectiveness in maintaining the position of the ball on the torso. α x and α y The data are shown in Figure 9 and Figure 10 The single DDMPC is evaluated, which maintains the ball balance in two directions when encountering disturbance. To implement the DDMPC, a prediction range L = 10 is set in this embodiment, and a relatively high weight and a relatively high weight are assigned to the control penalty matrix α x and α y The resulting system state and corresponding control input are shown in Figure 11 It is worth noting that the single DDMPC can effectively control the position of the ball without explicitly specifying and and and correlation between
[0195] In this case, there is no need to consider the potential coupling effects between different states in the two directions of the ball motion. By simply providing the required dynamic states, the results demonstrate the advantage of DD MPC in haptic servo control by exploiting the offline data. In contrast, the implementation of a PID controller in this haptic servo application relies on the a priori knowledge of the correlation between and in the tangent plane and the corresponding correlation in the sagittal plane. Moreover, the PID controller is limited to managing the ball balance control in a single direction. Based on the ball balance efficiency, the DD MPC still exhibits a more gentle control action in terms of ball velocity, which is characterized by lighter velocity oscillations.
[0196] This observation is evident from the haptic sensor velocity errors and which show fewer spikes. The haptic velocity spikes in the PID controller are mainly caused by the noise errors in the ball acceleration, while the DD MPC has much fewer such cases due to its ability to predict the future states and minimize the errors accordingly. Regarding the haptic sensor position errors e x and e y , the DD MPC is able to guide the ball back to the reference coordinates on the haptic board, while the PID controller cannot achieve this. These observations further indicate that the DD MPC exploits the advantage of the predictive future horizon and the optimal utilization of the online and offline state data. Therefore, the DD MPC is able to effectively reveal the dynamic characteristics of the ball balance system.
[0197] The technical scheme provided by the embodiment of the application achieves better effects in the balance task of the first object on the torso of the robot. The haptic servo controller based on the DD MPC is suitable for any robot with high degrees of freedom. In fact, as the number of system orders and the number of state variables and inputs increases, the size of the past data also increases. Considering the long prediction range used in the DD MPC, the size of the matrix used in the optimization algorithm increases dramatically. Therefore, it is very important to understand some skills of data collection procedures and numerical calculation details.
[0198] (1) Data collection: In the MPC-based robust haptic servo algorithm, both offline data and online data are used. Offline data is used to represent the characteristics of the robot system, and online data is used for real-time feedback control. In order to obtain reasonable performance, the control input u in the offline data collection should be a continuous excitation of L+n order in theory. A practical example of this case is that the data should contain as much information as possible. Here are some suggestions based on the practical experience of the application.
[0199] • The range of the haptic state variables in the collected data should cover their main range in the full working condition.
[0200] • There is no need to use a control strategy that stabilizes the feedback system. The data collected offline is used to characterize the dynamics of the system, not to explore control strategies. The control input data is only used to determine the next state of the system from the current state. If the control input stabilizes the feedback system, then offline data collection can be more convenient, but the method itself does not require a convergent strategy as a priori.
[0201] • Likewise, it does not matter whether the collected data includes states and inputs that converge the feedback system to an equilibrium point or not.
[0202] • The choice of a reasonable size n of the past data and a prediction horizon L leads to a reasonable dimension of the matrix used for the optimization problem, making it possible to run the proposed controller online. For those systems that run at very high control frequencies, it would be a good idea to down-sample the large volume of data, as long as the sampled data does not miss the key features of the robotic system and the control input u continues to excite the L + n-th order.
[0203] • Normalized transformations of the state variables and control inputs help to achieve better performance. Although this is not a mandatory step mathematically, the state variables and control inputs that are actually collected are often in different ranges and have severe noise. Let y i be the i-th state variable, and u i be the i-th control input, where i = 1, 2, · · ·, k. For a k-th order system a normalized transformation can be used. Where w i is the transformation weight, is the data after transformation. To ensure that the collected data are in a similar scale, different pre-defined weights can be applied to each variable, effectively scaling them into a comparable range. By applying this transformation in both the offline data and the online feedback, all the decision variables in the optimization are in a similar range, greatly reducing the numerical computation errors.
[0204] (2) Computational efficiency: The DDMPC algorithm is specifically optimized to improve computational efficiency. This is achieved by strategically converting four constraints into singular equality constraints for the quadratic optimization solver qpOASES. The third constraint (9) from the DDMPC algorithm is translated as a terminal equality constraint in the quadratic optimization problem, guiding the system towards the target state by equating the future trajectory of the LTI system (time steps from t+L-n to t+L-1) to the equilibrium point of the system. Since the future trajectory is unknown, it is predicted and updated in real-time during control based on the properties and historical data of the LTI system. The first condition function derives the output trajectory at the end of the algorithm by substituting h into the Hankel matrix equation after optimization. The second condition function represents the initial condition for the first condition function, linking the time steps from -n to -1 of the LTI system to the previous n trajectory points. By choosing a sufficiently large λ σ The fourth condition function is redundant as it is always satisfied absolutely. Therefore, the original four condition functions are effectively combined into a single condition function, improving the computational efficiency of the haptic servo task.
[0205] The visual servoing control in the related art can calculate correct robot motion commands and navigate the robot to the desired visual feature. The present application proposes a new haptic servo controller and endows the robot with similar functions, but the required functions are defined in the haptic space. This provides an important tool for enabling the robot to safely interact with unknown environments and perform the required tasks. The haptic servo method has demonstrated its capabilities in different robot operation scenarios: exploration, grasping, hand-held operation, and tool use.
[0206] Early haptic servoing relies on PID-type controllers, which require empirically designed parameters and cannot reliably guarantee convergence when the robot interacts with dynamic and movable objects. To address this deficiency, the present application formalizes the new controller as an optimization problem and utilizes interactive experiences and online measured haptic feedback to propose a systematic and technical design method. Since high-order haptic features are used as control states, the new controller can quickly respond to haptic deviations. Considering the high-dimensional matrix calculated from experienced haptic data, the present application adopts a dimension reduction strategy by reducing the number of equality and inequality constraints that have mathematical equivalence. Under the assumption of weak haptic measurement, the stability of the proposed controller can be guaranteed.
[0207] In some embodiments, the robot can have many forms, such as a robot in the form of a mechanical arm, a wheeled-legged robot, a mechanical dog, etc. Next, the technical solutions of the embodiments of the present application will be described taking a wheeled-legged robot as an example.
[0208] In some embodiments, the robot comprises at least one mechanical leg and a torso connected to the at least one mechanical leg, the torso moving in at least two degrees of freedom with movement of the at least one mechanical leg.
[0209] Reference is made to Figure 1 which shows a flowchart of a wheel-legged robot control method according to an embodiment of the present application. The method comprises at least one of the following steps 110-130.
[0210] In step 110, a sample data set is obtained, the sample data set comprising at least one pair of sample input data and sample output data of the robot, the sample input data being used to control movement of the at least one mechanical leg so that the first object is kept in a balanced state on the torso, and the sample output data being used to represent a pose of the robot and the first object after the movement of the at least one mechanical leg is controlled based on the sample input data.
[0211] In step 120, input data of the robot at the t-th time point is predicted according to the sample data set, t being a positive integer.
[0212] In step 130, movement of the at least one mechanical leg is controlled at the t-th time point based on the input data of the t-th time point, so that the first object is kept in a balanced state on the torso.
[0213] In some embodiments, the torso is connected to a top end of the at least one mechanical leg, each mechanical leg comprises at least one joint, a corresponding length of the mechanical leg changes with rotation of the joint, and the corresponding length of the mechanical leg refers to a straight-line distance from a reference point of the mechanical leg to a point of intersection between the robot and a bearing surface.
[0214] In some embodiments, the robot comprises H mechanical legs, each mechanical leg comprises one joint, a bottom end of the mechanical leg is supported on a bearing surface where the robot is located, and a top end of the mechanical leg is connected to the torso.
[0215] In some embodiments, the robot comprises G mechanical leg groups, each mechanical leg group comprises at least one mechanical leg, and the at least one mechanical leg in each mechanical leg group shares one wheel foot, G being a positive integer.
[0216] In some embodiments, the torso moves in at least two degrees of freedom in front-back, left-right, and up-down with movement of the mechanical leg.
[0217] Exemplarily, as Figure 2A wheeled biped robot is shown, the robot includes a trunk 221 and four mechanical legs 222-225, the first object 210 can move on the trunk 221 along with the movement of the trunk 221. The trunk 221 can move in six degrees of freedom in the x direction, the y direction, the z direction, and the negative direction of the x direction, the y direction and the z direction. Among the four mechanical legs, the mechanical leg 222 shares a wheeled foot with the mechanical leg 223, and the mechanical leg 224 shares a wheeled foot with the mechanical leg 225.
[0218] In some embodiments, the bearing surface on which the robot is located can be a horizontal plane, or a plane at an angle with the horizontal plane. In some embodiments, the intersection of the mechanical leg and the bearing surface can be variable or constant. Illustratively, the robot includes a mechanical leg, the bottom end of the mechanical leg intersects the bearing surface at point A at time t1, and intersects the bearing surface at point B at time t2, points A and B can be the same point or different points. In some embodiments, the robot includes multiple mechanical legs, and the intersection of the multiple mechanical legs with the bearing surface can all change, or only a part of them can change, or all of them can not change. Illustratively, the robot includes a mechanical leg 1 and a mechanical leg 2, at time t1, the bottom end of the mechanical leg 1 intersects the bearing surface at point A1, and the bottom end of the mechanical leg 2 intersects the bearing surface at point A2, at time t2, the bottom end of the mechanical leg 1 intersects the bearing surface at point B1, and the bottom end of the mechanical leg 2 intersects the bearing surface at point B2, A1 and B1 are the same point, and A2 and B2 are different points.
[0219] In some embodiments, the sample input data includes the rotation angle of the joint of at least one mechanical leg, and the sample output data includes at least one of the following: the position of the first object on the trunk, the speed of the first object, the moving direction of the first object, and the pose of the trunk.
[0220] A structure of a wheeled-legged robot is given, the technical scheme provided by the embodiments of the present application can be applied to the wheeled-legged robot as described above, wherein the input data is used to control the movement of H mechanical legs, and / or is used to control the movement of G wheeled feet, and the output data includes the pose of the H mechanical legs, the pose of the trunk, and the position of the first object on the trunk, etc. Of course, the structure of the robot is various, and here only an exemplary description is given. For robots with different structures, the input data and the output data will also be different.
[0221] In some embodiments, the pose of the trunk can be described by the angle between the trunk and the bearing surface.
[0222] In some embodiments, a condition function of the robot is determined according to the sample data set, the condition function being used to constrain input data and output data of the robot, and a loss function of the robot is determined according to the sample data set, the loss function being used to measure a difference degree between data at a t th< time and reference data, the data at the t th< time including input data at the t th< time and output data at the t th< time predicted based on the sample data set, the reference data including input data and output data of the robot when the robot and the first object are in a reference state; a feedback coefficient of the robot is determined according to the condition function and the loss function, the feedback coefficient being used to represent feedback of the robot to the input data at the t th< time; and the input data at the t th< time of the robot is predicted according to the feedback coefficient.
[0223] In some embodiments, the second matrix is determined based on at least one sample input data, the third matrix is determined based on at least one sample output data, and elements in the second matrix and the third matrix are one-to-one corresponding; the condition function of the robot is determined according to the first n rows in the second matrix and the first n rows in the third matrix, n being a system order of the robot, n being a positive integer; the loss function of the robot is determined according to the last L rows in the second matrix and the last L rows in the third matrix, L being a prediction step length of the robot, L being a positive integer; wherein the first n pairs of sample input data and sample output data of the robot are used to predict the last L pairs of input data and output data of the robot.
[0224] In some embodiments, the i-1 th< to the N-L-n+i-1 th< sample input data in the at least one sample input data are determined as the i th< row of the second matrix, and the i-1 th< to the N-L-n+i-1 th< sample output data in the at least one sample output data are determined as the i th< row of the third matrix, i being a positive integer.
[0225] In some embodiments, the condition function is determined according to the first n rows in the second matrix, the first n rows in the third matrix, a noise variable, a first threshold value, the feedback coefficient and the reference data, the condition function indicating that the robot approaches the reference state over time, the noise variable being used to describe measurement noise, and the first threshold value being an upper limit value of the noise variable.
[0226] In some embodiments, determining the conditional function according to the first n rows in the second matrix, the first n rows in the third matrix, the noise variable, the first threshold value, the feedback coefficient, and the reference data comprises: determining a first conditional function according to the noise variable, the first conditional function being used to reduce the interference of the measurement noise on the input data at the t th time; determining a second conditional function according to the first n rows in the second matrix and the first n rows in the third matrix, the second conditional function being used to describe the first n pairs of sample input data and sample output data; determining a third conditional function according to the first n rows in the second matrix, the first n rows in the third matrix, and the reference data, the third conditional function indicating that the robot approaches the reference state over time; and determining a fourth conditional function according to the noise variable, the first threshold value, and the feedback coefficient, the fourth conditional function being used to constrain the process convergence of predicting the input data at the t th time.
[0227] In some embodiments, determining the first norm according to the last L rows in the second matrix and the last L rows in the third matrix comprises: determining a second-order square norm of the last L sample input data, and determining a second-order square norm of the last L sample output data; determining a first penalty term according to the first penalty weight, the first threshold value, and a first regularization term, the first regularization term being a regularization penalty for the feedback coefficient, the first penalty weight being a penalty weight for the first regularization term, and the first threshold value being an upper limit value of the noise variable used to describe the measurement noise; determining a second penalty term according to a second penalty weight and a second regularization term, the second regularization term being a regularization penalty for the noise variable, and the second penalty weight being a penalty weight for the second regularization term; and determining the loss function according to the first norm, the first penalty term, and the second penalty term.
[0228] In some embodiments, determining the first matrix according to the at least one pair of sample input data and sample output data comprises: determining the second matrix comprising the at least one sample input data, and determining the third matrix comprising the at least one sample output data; and predicting the input data of the robot at the t th time according to the feedback coefficient and the first matrix.
[0229] In some embodiments, the above robot control method can also be applied to other robots with mechanical legs and platforms. For example, the above robot control method can be applied to a humanoid robot, where at least one mechanical leg is a pair of legs of the humanoid robot, the torso is a pair of hands of the humanoid robot, or a platform-like structure formed by a pair of hands holding a tray, a pair of arms, or a pair of hands after modification. The dynamics derivation method used by robots of different structures will be different, and the control method needs to be designed according to the structure of the robot, for example, in the control method of a humanoid robot, the relationship between the input data and the output data needs to be derived based on the specific structure of the humanoid robot, for example, the input data is the rotation angle of the joint of the pair of legs of the humanoid robot, and the output data is the position of the first object on the tray held by the pair of hands of the humanoid robot. In this process, the joints of the pair of arms and the pair of hands of the humanoid robot do not move, and the position of the first object on the tray held by the pair of hands of the humanoid robot can be regarded as relatively stable.
[0230] The following is an embodiment of the device of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0231] Please refer to Figure 12 which shows a block diagram of a robot control device according to an embodiment of the present application. The device has the function of implementing the above-mentioned method example of robot control, which can be realized by hardware or corresponding software executed by hardware. The device can be the robot introduced above, or can be arranged on the robot. The robot includes at least one mechanical leg and a torso connected to the at least one mechanical leg, and the torso moves in at least two degrees of freedom with the movement of the at least one mechanical leg. The device 1200 can include an acquisition module 1210, a prediction module 1220, and a control module 1230.
[0232] The acquisition module 1210 is configured to acquire a sample data set, the sample data set including at least one pair of sample input data and sample output data of the robot, the sample input data being used to control the movement of the at least one mechanical leg so that the first object remains in a balanced state on the torso, and the sample output data being used to represent the pose of the robot and the first object based on the sample input data controlling the movement of the at least one mechanical leg.
[0233] The prediction module 1220 is configured to predict the input data of the robot at the t-th time point according to the sample data set, t being a positive integer.
[0234] The control module 1230 is configured to control the movement of the at least one mechanical leg at the t-th time point based on the input data at the t-th time point, so that the first object remains balanced on the torso.
[0235] In some embodiments, the prediction module 1220 is configured to determine, according to the sample data set, a condition function of the robot and a loss function of the robot, the condition function being used to constrain input data and output data of the robot, the loss function being used to measure a difference degree between data at the t th time point and reference data, the data at the t th time point including input data at the t th time point and output data at the t th time point predicted based on the sample data set, the reference data including input data and output data of the robot when the robot and the first object are in a reference state; determine, according to the condition function and the loss function, a feedback coefficient of the robot, the feedback coefficient being used to represent feedback of the robot to the input data at the t th time point; and predict, according to the feedback coefficient, the input data of the robot at the t th time point.
[0236] In some embodiments, the prediction module 1220 is configured to determine a second matrix and a third matrix, the second matrix including at least one sample input data, the third matrix including at least one sample output data, elements in the second matrix and elements in the third matrix being in one-to-one correspondence; determine, according to the first n rows in the second matrix and the first n rows in the third matrix, a condition function of the robot, n being a system order of the robot, n being a positive integer; determine, according to the last L rows in the second matrix and the last L rows in the third matrix, a loss function of the robot, L being a prediction step length of the robot, L being a positive integer; and wherein the first n pairs of sample input data and sample output data of the robot are used to predict the last L pairs of input data and output data of the robot.
[0237] In some embodiments, the prediction module 1220 is configured to determine, as an i th row of the second matrix, i-1 th to N-L-n+i-1 th sample input data in the at least one sample input data; and determine, as an i th row of the third matrix, i-1 th to N-L-n+i-1 th sample output data in the at least one sample output data; wherein i is a positive integer.
[0238] In some embodiments, the prediction module 1220 is configured to determine, according to the first n rows in the second matrix, the first n rows in the third matrix, a noise variable, a first threshold value, a feedback coefficient and the reference data, the condition function, the noise variable being used to describe measurement noise, the first threshold value being an upper limit value of the noise variable.
[0239] In some embodiments, the conditional functions include a first conditional function, a second conditional function, a third conditional function, and a fourth conditional function; and the prediction module 1220 is configured to determine the conditional functions according to the first n rows in the second matrix, the first n rows in the third matrix, a noise variable, a first threshold value, a feedback coefficient, and the reference data, including: determining the first conditional function according to the noise variable, the first conditional function being used to reduce the interference of the measurement noise on the input data at the t-th time; determining the second conditional function according to the first n rows in the second matrix and the first n rows in the third matrix, the second conditional function being used to describe the first n pairs of sample input data and sample output data; determining the third conditional function according to the first n rows in the second matrix, the first n rows in the third matrix, and the reference data, the third conditional function representing that the robot approaches the reference state over time; and determining the fourth conditional function according to the noise variable, the first threshold value, and the feedback coefficient, the fourth conditional function being used to constrain the process of predicting the input data at the t-th time to converge.
[0240] In some embodiments, the prediction module 1220 is configured to determine a first norm according to the last L rows in the second matrix and the last L rows in the third matrix, wherein the first norm includes a second square norm of the last L sample input data and a second square norm of the last L sample output data; determine a first penalty term according to a first penalty weight, a first threshold value, and a first regularization term, the first regularization term being a regularization penalty for the feedback coefficient, the first penalty weight being a penalty weight for the first regularization term, and the first threshold value being an upper limit value of a noise variable used to describe measurement noise; determine a second penalty term according to a second penalty weight and a second regularization term, the second regularization term being a regularization penalty for the noise variable, and the second penalty weight being a penalty weight for the second regularization term; and determine the loss function according to the first norm, the first penalty term, and the second penalty term.
[0241] In some embodiments, the prediction module 1220 is configured to determine a first matrix according to the sample data set, the first matrix including at least one sample input data and at least one sample output data; and predict the input data of the robot at the t-th time according to the feedback coefficient and the first matrix.
[0242] In some embodiments, the torso is connected to a top end of the at least one mechanical leg, each mechanical leg comprises at least one joint, a corresponding length of the mechanical leg changes with rotation of the joint, the corresponding length of the mechanical leg refers to a straight-line distance from a reference point of the mechanical leg to a point of intersection of the robot and a bearing surface; the robot comprises G mechanical leg groups, each mechanical leg group comprises at least two mechanical legs, the at least two mechanical legs in each mechanical leg group share one wheeled foot, and G is a positive integer; the sample input data comprises respective rotation angles of the joints of the at least one mechanical leg, and the historical output data comprises at least one of the following: a position of the first object on the torso, a speed of the first object, a moving direction of the first object, and a pose of the torso.
[0243] In some embodiments, the prediction module 1220 is configured to determine a motion parameter of the first object according to the feedback coefficient and the first matrix, the motion parameter comprising at least one parameter affecting kinetic energy or potential energy; determine respective lengths of the at least one mechanical leg according to the motion parameter of the first object, the corresponding length of the mechanical leg referring to a straight-line distance from a reference point of the mechanical leg to a point of intersection of the robot and a bearing surface; and predict input data of the robot at the t th time according to the respective lengths of the at least one mechanical leg; wherein the motion parameter comprises at least one of the following: a mass of the first object, a speed of the first object in a first direction, an acceleration of the first object in the first direction, a speed of the first object in a second direction, and an acceleration of the first object in the second direction, the first direction and the second direction being two directions perpendicular to each other in a horizontal plane.
[0244] In some embodiments, the acquisition module 1210 is configured to, for the t th time, acquire a historical data pair of a plurality of continuous historical times before the t th time, the historical data pair comprising historical input data and historical output data; and uniformly sample the historical data pairs of the plurality of continuous historical times to obtain the sample data set.
[0245] The technical scheme provided by the embodiments of the present application predicts the input data of the robot by acquiring a plurality of sample data pairs, obtains the input data at the t th time, and controls the motion of the robot based on the predicted input data at the t th time, to complete the task of keeping the first object balanced on the robot. The system state of the robot is predicted according to the sample data, the feedforward variable of the sample data is considered, and the state of the robot is predicted based on the sample data, without waiting for an error to occur before controlling the robot system, so that the control response is faster.
[0246] It should be noted that the apparatus provided by the above embodiments, in realizing its functions, is only exemplified by the above division of each functional module, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0247] Figure 13 A structural block diagram of a robot provided by an example embodiment of the present application is shown. The robot 1300 can be the robot introduced above.
[0248] Generally, the robot 1300 includes a processor 1301 and a memory 1302.
[0249] The processor 1301 can include one or more processing cores, such as a 4-core processor, a 13-core processor, etc. The processor 1301 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), a FPGA (Field Programmable Gate Array), a PLA (Programmable Logic Array). The processor 1301 can also include a main processor and a coprocessor, the main processor is a processor for processing data in the wake-up state, also known as CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1301 can be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 1301 can also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0250] The memory 1302 can include one or more computer-readable storage media, which can be tangible and non-transitory. The memory 1302 can also include a high-speed random access memory, and a non-volatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1302 stores a computer program loaded and executed by the processor 1301 to implement the robot control method provided by the above method embodiments.
[0251] In an example embodiment, a computer readable storage medium is also provided, the storage medium storing a computer program, the computer program being executed by a processor to implement the robot control method.
[0252] Optionally, the computer readable storage medium can include ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or optical disc, etc. Among them, the random access memory can include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0253] In an example embodiment, a computer program product is also provided, the computer program product including a computer program stored in a computer readable storage medium. The processor of the robot reads the computer program from the computer readable storage medium, and the processor executes the computer program to make the robot execute the robot control method.
[0254] It should be understood that "multiple" referred to herein means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.
[0255] The above only describes example embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A robot control method characterized by, The robot comprises at least one mechanical leg and a torso connected to the at least one mechanical leg, the torso moves in at least two degrees of freedom with the movement of the at least one mechanical leg, and the method comprises: obtaining a sample data set, the sample data set comprising at least one pair of sample input data and sample output data of the robot, the sample input data being used to control the movement of the at least one mechanical leg so that the first object is in a balanced state on the torso, and the sample output data being used to represent the pose of the robot and the first object based on the control of the movement of the at least one mechanical leg according to the sample input data; predicting input data of the robot at the t-th time according to the sample data set, t being a positive integer; controlling the movement of the at least one mechanical leg at the t-th time based on the input data of the robot at the t-th time, so that the first object is in a balanced state on the torso.
2. The method of claim 1, wherein, The prediction of the input data of the robot at the t-th time according to the sample data set comprises: determining a condition function and a loss function of the robot according to the sample data set, the condition function being used to constrain the input data and the output data of the robot, the loss function being used to measure the difference between the data at the t-th time and reference data, the data at the t-th time comprising the input data at the t-th time and the output data at the t-th time predicted based on the sample data set, and the reference data comprising the input data and the output data of the robot and the first object in a reference state; determining a feedback coefficient of the robot according to the condition function and the loss function, the feedback coefficient being used to represent the feedback of the robot to the input data at the t-th time; predicting the input data of the robot at the t-th time according to the feedback coefficient.
3. The method of claim 2, wherein, The prediction of the input data of the robot at the t-th time according to the feedback coefficient comprises: determining a first matrix according to the sample data set, the first matrix comprising at least one sample input data and at least one sample output data; predicting the input data of the robot at the t-th time according to the feedback coefficient and the first matrix.
4. The method of claim 2, wherein, The prediction of the input data of the robot at the t-th time according to the feedback coefficient and the first matrix comprises: determining a motion parameter of the first object according to the feedback coefficient and the first matrix, the motion parameter comprising at least one parameter affecting kinetic energy or potential energy; determining the length corresponding to the at least one mechanical leg respectively according to the motion parameter of the first object, the length corresponding to the mechanical leg being the straight-line distance from the reference point of the mechanical leg to the intersection point of the robot and the bearing surface; predicting the input data of the robot at the t-th time according to the length corresponding to the at least one mechanical leg respectively. The motion parameter comprises at least one of a mass of the first object, a velocity of the first object in a first direction, an acceleration of the first object in the first direction, a velocity of the first object in a second direction, and an acceleration of the first object in the second direction.
5. The method of claim 2, wherein, The determining the condition function and the loss function of the robot according to the sample data set comprises: determining a second matrix based on at least one sample input data and determining a third matrix based on at least one sample output data, elements in the second matrix and the third matrix are in one-to-one correspondence; determining the condition function of the robot according to the first n rows in the second matrix and the first n rows in the third matrix, n is a system order of the robot, and n is a positive integer; determining the loss function of the robot according to the last L rows in the second matrix and the last L rows in the third matrix, L is a prediction step length of the robot, and L is a positive integer; The first n pairs of sample input data and sample output data of the robot are used to predict the last L pairs of input data and output data of the robot.
6. The method of claim 5, wherein, The determining the second matrix based on at least one sample input data and the determining the third matrix based on at least one sample output data comprise: determining i-1 to N-L-n+i-1 sample input data in the at least one sample input data as the i-th row of the second matrix; determining i-1 to N-L-n+i-1 sample output data in the at least one sample output data as the i-th row of the third matrix; and wherein i is a positive integer.
7. The method of claim 5, wherein, The determining the condition function of the robot according to the first n rows in the second matrix and the first n rows in the third matrix comprises: determining the condition function according to the first n rows in the second matrix, the first n rows in the third matrix, a noise variable, a first threshold value, a feedback coefficient and the reference data, the noise variable is used to describe measurement noise, and the first threshold value is an upper limit value of the noise variable.
8. The method of claim 7, wherein, The determining the condition function according to the first n rows in the second matrix, the first n rows in the third matrix, a noise variable, a first threshold value, a feedback coefficient and the reference data comprises: determining a first condition function according to the noise variable, the first condition function is used to reduce the interference of the measurement noise on the input data at the t-th time point; determining a second condition function according to the first n rows in the second matrix and the first n rows in the third matrix, the second condition function is used to describe the first n pairs of sample input data and sample output data; determining a third condition function according to the first n rows in the second matrix, the first n rows in the third matrix and the reference data, the third condition function represents that the robot approaches the reference state over time; determining a fourth condition function according to the noise variable, the first threshold value and the feedback coefficient, the fourth condition function is used to constrain the process of predicting the input data at the t-th time point to converge.
9. The method of claim 5, wherein, The determining the loss function of the robot according to the last L rows in the second matrix and the last L rows in the third matrix comprises: determining a first norm according to the last L rows in the second matrix and the last L rows in the third matrix, wherein the first norm comprises a second square norm of the last L sample input data and a second square norm of the last L sample output data; determining a first penalty term according to a first penalty weight, a first threshold value and a first regularization term, wherein the first regularization term is a regularization penalty for the feedback coefficient, the first penalty weight is a penalty weight for the first regularization term, and the first threshold value is an upper limit value of a noise variable used to describe measurement noise; determining a second penalty term according to a second penalty weight and a second regularization term, wherein the second regularization term is a regularization penalty for the noise variable, and the second penalty weight is a penalty weight for the second regularization term; determining the loss function according to the first norm, the first penalty term and the second penalty term.
10. The method of claim 1, wherein, The obtaining the sample data set comprises: obtaining at least one sample input data; for the jth sample input data in the at least one sample input data, determining a pose of the robot after the robot moves based on the jth sample input data, j being a positive integer; obtaining a position of the first object on the torso based on the tactile sensor; determining jth sample output data according to the pose of the robot after the robot moves based on the jth sample input data and the position of the first object.
11. The method of claim 1, wherein, The obtaining the sample data set comprises: for a tth time point, obtaining a historical data pair of a plurality of continuous historical time points before the tth time point, the historical data pair comprising historical input data and historical output data; uniformly sampling the historical data pairs of the plurality of continuous historical time points to obtain the sample data set.
12. The method of any one of claims 1 to 11, wherein: the torso is connected to a top end of the at least one mechanical leg, each mechanical leg comprises at least one joint, a corresponding length of the mechanical leg changes with rotation of the joint, and the corresponding length of the mechanical leg refers to a straight-line distance from a reference point of the mechanical leg to an intersection point of the robot and a bearing surface; the robot comprises G mechanical leg groups, each mechanical leg group comprises at least two mechanical legs, and the at least two mechanical legs in each mechanical leg group share one wheeled foot, G being a positive integer; the sample input data comprises a rotation angle corresponding to a joint of the at least one mechanical leg, and the historical output data comprises at least one of the following: a position of the first object on the torso, a velocity of the first object, a moving direction of the first object, and a pose of the torso.
13. A robot control device characterized by comprising: The robot comprises at least one mechanical leg and a torso connected to the at least one mechanical leg, the torso moves in at least two degrees of freedom with movement of the at least one mechanical leg, and the device comprises: An acquisition module is configured to acquire a sample data set, the sample data set including at least one pair of sample input data and sample output data of the robot, the sample input data being used to control movement of the at least one mechanical leg so that the first object is kept in a balanced state on the torso, and the sample output data being used to represent a pose of the robot and the first object after the movement of the at least one mechanical leg is controlled based on the sample input data. A prediction module is configured to predict input data of the robot at a t-th time point according to the sample data set, t being a positive integer. A control module is configured to control movement of the at least one mechanical leg at the t-th time point based on the input data of the robot at the t-th time point, so that the first object is kept in a balanced state on the torso.
14. A robot, characterized in that The robot includes a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the robot control method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program being loaded and executed by the processor to implement the robot control method according to any one of claims 1 to 12.
16. A computer program product, characterised in that, The computer program product includes a computer program stored in a computer readable storage medium, and the processor reads and executes the computer program from the computer readable storage medium to implement the robot control method according to any one of claims 1 to 12.