Two-wheeled robot control method and apparatus, medium, program, and robot
By calculating the optimal feedback gain and variable matrix, the control torque of the two-wheeled robot is adjusted, which solves the problem of difficulty in balancing the two-wheeled robot in a stationary state and improves stability and safety.
Patent Information
- Application Number
- PCT/CN2023/120933
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-09-30
- Filing Date
- 2023-09-25
- Publication Date
- 2024-09-12
AI Technical Summary
It is difficult for existing two-wheeled robots to maintain balance in a stationary state. Especially when working conditions change and state estimation errors occur, the balance controller cannot maintain optimality, causing the balance effect to be destroyed.
By calculating the optimal feedback gain, optimal variable matrix and uncertainty, calculating the angle deviation matrix and noise deviation matrix, the control torque is obtained to adjust the motor torque to ensure that the center of mass of the two-wheeled robot is perpendicular to the ground, thereby maintaining a stationary state.
The stability and safety of the two-wheeled robot are improved, allowing it to stay in place or move within a small range, making it suitable for precise operation scenarios that require chassis stability.
Smart Images

Figure CN2023120933_12092024_PF_FP_ABST
Abstract
Description
Control method, device, medium, program and robot for two-wheeled robot
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 30, 2022, with application number 202211208634.7 and application name “Control method, device, medium, program and robot for two-wheeled robots”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present invention relates to the field of artificial intelligence, and in particular to the control of two-wheeled robots. Background Art
[0003] Two-wheeled robots include balancing cars, two-wheeled legged robots, two-wheeled robots with other upper body forms (humanoid), etc. How to make two-wheeled robots maintain balance in a static state is a topic worthy of research.
[0004] To ensure a two-wheeled robot maintains balance even when stationary, the technology uses sensors to collect the robot's shape and estimate its center of mass. The robot's pitch angle and linear velocity are then adjusted using the torque of the wheel motors to ensure the line connecting the robot's center of mass and the wheel center is perpendicular to the ground, thus ensuring the robot's balance when stationary.
[0005] However, due to changes in working conditions (changes in its own structure, changes in the external environment, changes in load, etc.) and errors in state estimation (center of gravity estimation error, sensor installation error, etc.), the balancing controller cannot maintain the optimality of its original design during operation, resulting in the destruction of the balancing effect.
[0006] Summary of the Invention
[0007] The present application provides a control method, device, medium, program, and robot for a two-wheeled robot. The method can achieve a stationary state of the two-wheeled robot in a balanced state. The technical solution is as follows:
[0008] According to one aspect of the present application, a control method for a two-wheeled robot is provided, the method comprising:
[0009] Calculating an optimal feedback gain, an optimal variable matrix, and an uncertainty based on a first state variable and a first feedback gain of the two-wheeled robot, wherein the optimal variable matrix is used to represent a gain degree of the motion state of the two-wheeled robot on the control mode of the two-wheeled robot;
[0010] Calculating an angle deviation matrix and a noise deviation matrix according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot;
[0011] Obtaining a control torque of the two-wheeled robot according to the second state variable, the optimal feedback gain, the angle deviation matrix, and the noise deviation matrix;
[0012] The two-wheeled robot is controlled according to the control torque.
[0013] According to one aspect of the present application, a control device for a two-wheeled robot is provided, the device comprising:
[0014] a calculation module, configured to calculate an optimal feedback gain, an optimal variable matrix, and an uncertainty based on a first state variable and a first feedback gain of the two-wheeled robot, wherein the optimal variable matrix is used to represent a gain degree of the motion state of the two-wheeled robot on the control mode of the two-wheeled robot;
[0015] The calculation module is further configured to calculate an angle deviation matrix and a noise deviation matrix based on the optimal feedback gain, the optimal variable matrix, the uncertainty, and the second state variable of the two-wheeled robot;
[0016] The calculation module is further configured to obtain a control torque of the two-wheeled robot according to the second state variable, the optimal feedback gain, the angle deviation matrix, and the noise deviation matrix;
[0017] A control module is used to control the two-wheeled robot according to the control torque.
[0018] According to another aspect of the present application, a robot is provided, the robot including a processor, the processor being configured to load and execute the control method for the two-wheeled robot as described above.
[0019] According to another aspect of the present application, a computer storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the control method of the two-wheeled robot as described above.
[0020] According to another aspect of the present application, a computer program product is provided, which includes a computer program. When the computer program product is run on a computer, the computer is caused to execute the control method of the two-wheeled robot as described above.
[0021] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0022] Based on the first state variable and first feedback gain of the two-wheeled robot, the optimal feedback gain, optimal variable matrix, and uncertainty are obtained. The angle deviation matrix and noise deviation matrix are then calculated based on the optimal feedback gain, optimal variable matrix, uncertainty, and the second state variable of the two-wheeled robot. The control torque of the two-wheeled robot is then calculated using the second state variable, optimal feedback gain, angle deviation matrix, and noise deviation matrix. Finally, the control torque is used to control the two-wheeled robot. This method allows the two-wheeled robot to remain stationary or move within a very small range, improving its stability and safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] FIG1 shows a schematic diagram of a two-wheeled robot provided in an embodiment of the present application;
[0024] FIG2 is a schematic diagram showing a control system of a two-wheeled robot provided in an embodiment of the present application;
[0025] FIG3 is a schematic flow chart of a control method for a two-wheeled robot provided in an embodiment of the present application;
[0026] FIG4 is a schematic diagram of a sagittal plane of a two-wheeled robot provided in an embodiment of the present application;
[0027] FIG5 is a schematic flow chart showing a control method for a two-wheeled robot according to an embodiment of the present application;
[0028] FIG6 shows a curve diagram of training data provided by an embodiment of the present application;
[0029] FIG7 shows a curve diagram of training data provided by an embodiment of the present application;
[0030] FIG8 shows a curve diagram of training data provided by an embodiment of the present application;
[0031] FIG9 shows a curve diagram of training data provided by an embodiment of the present application;
[0032] FIG10 shows a curve diagram of training data provided by an embodiment of the present application;
[0033] FIG11 shows a curve diagram of training data provided by an embodiment of the present application;
[0034] FIG12 shows a curve diagram of training data provided by an embodiment of the present application;
[0035] FIG13 shows a schematic diagram of a control device for a two-wheeled robot provided in an embodiment of the present application;
[0036] FIG14 shows a schematic structural diagram of a controller provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0038] It should be noted that before collecting the user's relevant data and during the process of collecting the user's relevant data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0039] In the embodiments of the present application, a two-wheeled robot is a wheel-legged two-wheeled robot. FIG1 shows a schematic diagram of a two-wheeled robot provided in an embodiment of the present application. The two-wheeled robot 100 includes a base 11, legs 12, legs 13, and a tail rod 14.
[0040] The base 11 houses the two-wheeled robot's controller. As shown in Figure 1, the base 11 is equipped with four motors: motor 111, motor 112, motor 113, and motor 114. Motors 111 and 112 drive legs 12, while motors 113 and 114 drive legs 13. In some embodiments, the posture of the base 11 can be adjusted by changing the height of legs 12 and 13, that is, the distance between the center of the wheel and the plane of the legs.
[0041] The supporting leg 12 is provided with a motor 121 for driving a wheel 122. Optionally, the supporting leg 12 adopts a five-bar linkage mechanism so that the supporting leg 12 is driven by the motor 111 and the motor 112 on the base 11, while the knee of the supporting leg 12 has no driver.
[0042] The supporting leg 13 is provided with a motor 131 for driving a wheel 132. Optionally, the supporting leg 13 adopts a five-bar linkage mechanism so that the supporting leg 13 is driven by the motor 113 and the motor 114 on the base 11, while the knee of the supporting leg 13 has no driver.
[0043] The tail rod 14 is provided with a motor 141 and a motor 142. In some embodiments, the motor 141 is used to drive the wheel 143. In some embodiments, the motor 142 is used to adjust the shape of the tail rod 14. For example, the tail rod 14 includes a stowed state and a lowered state. When the tail rod 14 is in the stowed state, the wheel 143 is in a suspended state and the wheel 143 is not in contact with the ground. When the tail rod 14 is in the lowered state, the wheel 143 is in contact with the ground. In some embodiments, by adjusting the state of the wheel 143, the two-wheeled robot 100 can also flexibly switch between two-wheel and three-wheel modes. In some embodiments, the wheel-legged two-wheeled robot can achieve crossing obstacles, jumping and flipping. Optionally, the height of the wheel-legged two-wheeled robot is between 0.33 meters and 0.7 meters.
[0044] It should be noted that Figure 1 only shows an optional form of a two-wheeled robot. The two-wheeled robot involved in the embodiment of the present application may also be other robots with two parallel wheels. The embodiment of the present application does not specifically limit the form of the upper body of the two-wheeled robot.
[0045] 2 shows a schematic diagram of a control system for a two-wheeled robot according to an embodiment of the present application. The control system 200 is composed of an adaptive adjustment subsystem 203 and an external command control subsystem 206 .
[0046] Two-wheeled robot 201 acquires sensor data and generates a state estimate 202 based on the sensor data. Optionally, state estimate 202 includes at least one of linear velocity, pitch angular velocity, base height, and ground slope. Adaptive adjustment subsystem 203 generates a balance control strategy based on state estimate 202. The balance control strategy is used to control two-wheeled robot 201 to maintain balance.
[0047] The control system 200 obtains a motion instruction 205 , which may include at least one of forward, backward, still, jump, adjust base height, and flip. The external instruction control subsystem 206 generates a motion control strategy based on the motion instruction 205 .
[0048] The control system 200 generates a whole-body control strategy 204 based on the balance control strategy and the motion control strategy. The whole-body control strategy 204 is used to control the two-wheeled robot 201 to move while maintaining a balanced state. In some embodiments, the whole-body control strategy includes at least one of a balance control strategy, other control strategies, and constraints. The other control strategies represent control methods other than controlling the two-wheeled robot 201 to maintain balance, and the constraints represent restrictions on the two-wheeled robot 201. The control system 200 sends the whole-body control strategy 204 to the two-wheeled robot 201, which then executes the whole-body control strategy 204.
[0049] FIG3 shows a flow chart of a control method for a two-wheeled robot provided by an embodiment of the present application. The method can be executed by controlling the two-wheeled robot shown in FIG1 by a control unit (processor). The control unit can be arranged inside the two-wheeled robot or outside the two-wheeled robot, and the present application does not limit this. When the control unit is arranged inside the two-wheeled robot, the control unit can serve as a control chip of the two-wheeled robot. When the control unit is arranged outside the two-wheeled robot, the control unit is arranged in a control device for controlling the two robots.
[0050] The method includes:
[0051] Step 302: Calculate the optimal feedback gain, optimal variable matrix, and uncertainty based on the first state variable and the first feedback gain of the two-wheeled robot. The optimal variable matrix is used to represent the gain degree of the motion state of the two-wheeled robot on the control mode of the two-wheeled robot.
[0052] In the embodiment of the present application, the variable matrix refers to a Lyapunov matrix.
[0053] The first state variable is used to represent the motion state of the two-wheeled robot measured in the first time period. Optionally, the first state variable includes at least one of the pitch angle, pitch angular velocity and linear velocity of the two-wheeled robot.
[0054] The first feedback gain is used to represent the relationship between the motion state and the control matrix of the two-wheeled robot in the balancing system. For example, in the balancing system, the control matrix of the two-wheeled robot is τ = -K0ζ + β, where K0 refers to the first feedback gain, ζ refers to the state variable, and β is used to represent the change in the motion of the two-wheeled robot. β can be represented as a time-related variable β(t), t∈[t0, t s ], t0<t s The first state variable is [t0, t s ] any state variable within the period.
[0055] The optimal feedback gain is used to represent the relationship between the motion state and the control matrix of a stationary two-wheeled robot in a balancing system.
[0056] Uncertainty is used to compensate for the error of the two-wheeled robot during movement.
[0057] Step 304: Calculate the angle deviation matrix and the noise deviation matrix according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot.
[0058] The second state variable is used to represent the state of the two-wheeled robot in the second period. Optionally, the second state variable includes at least one of the pitch angle, pitch angular velocity and linear velocity of the two-wheeled robot.
[0059] The angle deviation matrix is used to represent the difference between the actual pitch angle and the measured pitch angle of the two-wheeled robot.
[0060] The noise deviation matrix is used to represent the environmental noise of the two-wheeled robot.
[0061] Optionally, the first state variable is [t0, t s ] period, the second state variable refers to the state variable in (t s , +∞). In a specific example, the first state variable refers to the state variable in [1, 8], and the second state variable refers to the state variable in the second time period in (8, +∞). Therefore, the embodiment of the present application uses the state variables in the first time period as a priori experience, determines the control torque of the two-wheeled robot according to the state variables in the second time period, and controls the two-wheeled robot in the second time period according to the control torque.
[0062] It should be noted that the first state variable and the second state variable should be state variables of the same type.
[0063] Step 306: Obtain the control torque of the two-wheeled robot according to the second state variable, the optimal feedback gain, the angle deviation matrix, and the noise deviation matrix.
[0064] Optionally, a system compensation value is obtained according to the optimal feedback gain, the angle deviation matrix and the noise deviation matrix; and a control torque of the two-wheeled robot is obtained according to the optimal feedback gain, the second state variable and the system compensation value.
[0065] For example, the system compensation value L=K * Z+T,K * Refers to the optimal feedback gain, Z refers to the angle deviation matrix, and T refers to the noise deviation matrix. The control torque of the two-wheeled robot is τ = -K * ζ+L, ζ refers to the second state variable.
[0066] Step 308: Control the two-wheeled robot according to the control torque.
[0067] In some embodiments, as shown in FIG1 , the torques of motors 111 , 112 , 113 , 114 , 121 , and 131 are controlled according to the control torque so that the two-wheeled robot remains stationary in a balanced state.
[0068] In summary, the embodiment of the present application obtains the optimal feedback gain, the optimal variable matrix and the uncertainty based on the first state variable and the first feedback gain of the two-wheeled robot. Then, based on the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot, the angle deviation matrix and the noise deviation matrix are calculated. Then, using the second state variable, the optimal feedback gain, the angle deviation matrix and the noise deviation matrix, the control torque of the two-wheeled robot is obtained, and finally the two-wheeled robot is controlled by the control torque. This method allows the two-wheeled robot to remain stationary or move within a very small range, thereby improving the stability and safety of the two-wheeled robot.
[0069] In the following embodiments, it is difficult for a two-wheeled robot to maintain a completely stationary standing position under different working conditions. In order for the two-wheeled robot to remain stationary, the center of mass (COM) should be perpendicular to the line connecting the middle of the wheels. Therefore, accurately estimating the center of mass position is crucial for the controller of the two-wheeled robot. However, due to uneven mass distribution and assembly errors, it is inevitable that the center of mass position deviates from the expected position in practice. This is shown in the sagittal plane of Figure 4, where the center of mass of the base is theoretically consistent with the geometric center, but in practice the center of mass 402 of the base is different from the geometric center 401.
[0070] In order to solve the above problem, in the task of balancing the two-wheeled robot, it is necessary to adjust the motor torque τ on the control wheel so that the pitch angle of the two-wheeled robot remains unchanged, and the pitch angular velocity and linear velocity are adjusted to 0. Then the system composed of the two-wheeled robot can be expressed by the following formula:
[0071] in, It should be noted that due to the uncertainty of the robot system, the precise expressions of A and B are difficult to model, so the precise expressions of A and B are not used in the embodiments of the present application.
[0072] Taking into account the deviation of the center of mass, the actual pitch angle is the difference between the measured pitch angle θ and the pitch angle offset Δθ, that is, There is no deviation for the pitch angular velocity and linear velocity. The actual pitch angular velocity Equal to the measured pitch angular velocity Actual line speed Equal to the measured linear velocity Right now So we get the following formula:
[0073] in, Since Δθ is unknown, D is also unknown. In addition, in order to make the two-wheeled robot stationary at a fixed position, choose As the output is regulated to 0, The error is:
[0074] Where C = [0 0 1].
[0075] In the embodiment of the present application, the control torque of the two-wheeled robot can be expressed as follows: τ = -Kζ + L, (4)
[0076] Where L = KZ + T, Z = [Δθ 0 0] T , K is the stable feedback gain, In the above expression, the first term is used to adjust the motion state ζ of the two-wheeled robot, and the second term is used to compensate for uncertainty. ), Z and T can be solved by the following adjustment equations: 0=AZ+BT+D, (5) 0=CZ, (6)
[0077] Due to the unique underactuated dynamics of two-wheeled robots, the above regulation equation has a unique solution. This is because for a two-wheeled robot in a stationary state, the motion state of the two-wheeled robot satisfies ζ = [Δθ 0 0], and the control torque of the two-wheeled robot is fixed.
[0078] In this application, the optimal solution of the above regulation equation is expressed by solving the following constrained optimization problem of state feedback control:
[0079] in, It is positive. The optimal solution is expressed as optimal feedback:
[0080] K * =-R -1 B T P * , (8)
[0081] Where P is the variable matrix mentioned above.
[0082] Based on the above demonstration process, FIG5 shows a flow chart of a control method for a two-wheeled robot provided in an embodiment of the present application. The method can be executed by the two-wheeled robot 100 shown in the figure, and the method includes:
[0083] Step 501: Obtain the jth variable matrix through the first state variable and the j+1th feedback gain.
[0084] The first state variable is used to represent the measured state of the two-wheeled robot in the first time period. Optionally, the first state variable includes at least one of the pitch angle, pitch angular velocity and linear velocity of the two-wheeled robot.
[0085] Optionally, this step includes the following sub-steps:
[0086] 1. Determine a first intermediate matrix, a second intermediate matrix, and a third intermediate matrix according to the first state variable;
[0087] For example, the first intermediate matrix is denoted as ∧ ζ,ζ , the second intermediate matrix is recorded as ∑ ζ,ζ , the third intermediate matrix is recorded as ∑ ζ,τ Then we have:
[0088] Where ζ represents the first state variable of the two-wheeled robot, t represents time, and τ represents the control torque of the two-wheeled robot.
[0089] 2. Obtain a first polynomial of the first equation based on the j+1th feedback gain, the first intermediate matrix, the second intermediate matrix, and the third intermediate matrix;
[0090] For example, the first polynomial is written as
[0091] in, I n , R is a constant matrix, Used to represent tensor products.
[0092] 3. Obtain a second polynomial of the first equation based on the j+1th feedback gain and the first intermediate matrix;
[0093] Exemplarily, the second polynomial is denoted as Φ, where Q is a constant matrix.
[0094] 4. When the first polynomial and the second polynomial are equal, solve the first equation and obtain the j-th variable matrix.
[0095] For example, solving the first equation Get the j-th variable matrix, that is, P in the equation j .
[0096] It should be noted that in order to ensure that the first equation has a solution, the fourth intermediate matrix is determined based on the first state variable; when the second intermediate matrix, the third intermediate matrix and the fourth intermediate matrix reach full rank, step 2 is performed, that is, the first polynomial of the first equation is obtained based on the j+1th feedback gain, the first intermediate matrix, the second intermediate matrix and the third intermediate matrix.
[0097] The fourth intermediate matrix is denoted as ∑ ζ , then When the second intermediate matrix, the third intermediate matrix, and the fourth intermediate matrix reach full rank, the following equation is satisfied:
[0098] The first intermediate matrix includes a difference between a tensor product of the first state variable and the first state variable at the first moment and a tensor product of the first state variable and the first state variable at the second moment;
[0099] The second intermediate matrix includes the first state variable between the first moment and the second moment and the integral of the first state variable;
[0100] The third intermediate matrix includes the first state variable and the integral of the torque of the two-wheeled robot between the first moment and the second moment;
[0101] The fourth intermediate matrix includes the integral of the first state variable between the first time instant and the second time instant.
[0102] The first moment and the second moment are two different sampling values within the first time period.
[0103] Step 502: Determine the j+2th feedback gain according to the j+1th feedback gain.
[0104] Exemplarily, according to the first equation and the j+1th feedback gain, the j+2th feedback gain is obtained.
[0105] Step 503: Update j to j+1 and repeat the above two steps.
[0106] Exemplarily, the above steps 501 to 502 are repeated until the convergence condition is met.
[0107] Step 504: When the j-th variable matrix reaches convergence, the j-th variable matrix is determined as the optimal variable matrix; and the j+1-th feedback gain is determined as the optimal feedback gain.
[0108] For example, in ||P j+1 -P j When ||<ε, and ε is any positive real number, it is determined that the j-th variable matrix reaches convergence.
[0109] For example, the optimal variable matrix P * =P j , optimal feedback gain K * =K j+1 .
[0110] Step 505: Determine uncertainty based on the optimal variable matrix, the optimal feedback gain, and the first state variable.
[0111] For example, in determining the optimal variable matrix P * , optimal feedback gain K* and the first state variable ζ, the uncertainty D is determined according to the first equation above.
[0112] Step 506: Determine the actual state variable according to the second state variable.
[0113] The actual state variable is used to represent the actual state of the two-wheeled robot in the second period. The second state variable is The actual state variable is in, and
[0114] Step 507: Obtain an error linear function according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the actual state variable.
[0115] Optionally, this step includes the following sub-steps:
[0116] 1. Determine the fourth intermediate matrix, the fifth intermediate matrix, and the sixth intermediate matrix according to the actual state variables;
[0117] For example, the fourth intermediate matrix is recorded as The fifth intermediate matrix is denoted as The sixth intermediate matrix is denoted as Then we have:
[0118] in, represents the second state variable of the two-wheeled robot, t represents time, and τ represents the control torque of the two-wheeled robot.
[0119] 2. Obtain a third polynomial of the second equation based on the optimal feedback gain, the optimal variable matrix, the uncertainty, the fourth intermediate matrix, the fifth intermediate matrix, and the sixth intermediate matrix;
[0120] For example, the third polynomial is written as
[0121] in, I n , R is a constant matrix, Used to represent tensor products.
[0122] 3. Obtain a fourth polynomial of the second equation based on the second state variable and the fourth intermediate matrix;
[0123] For example, the fourth polynomial is written as in, Q is a constant matrix.
[0124] 4. When the third and fourth polynomials are equal, solve the second equation to obtain the error linear function.
[0125] For example, solving the second equation The error linear function is obtained, that is,
[0126] It should be noted that in order to ensure that the second equation has a solution, the eighth intermediate matrix is determined based on the second state variable; when the sixth intermediate matrix, the seventh intermediate matrix and the eighth intermediate matrix reach full rank, step 2 is performed, that is, based on the optimal feedback gain, the optimal variable matrix, the uncertainty, the fourth intermediate matrix, the fifth intermediate matrix and the sixth intermediate matrix, the third polynomial of the second equation is obtained.
[0127] For example, the eighth intermediate matrix is recorded as Then there is When the sixth intermediate matrix, the seventh intermediate matrix, and the eighth intermediate matrix reach full rank, the following equation is satisfied:
[0128] The fifth intermediate matrix includes the difference between the tensor product of the actual state variable and the actual state variable at the third moment and the tensor product of the actual state variable and the actual state variable at the fourth moment;
[0129] The sixth intermediate matrix includes the actual state variables between the third moment and the fourth moment and the integral of the actual state variables;
[0130] The seventh intermediate matrix includes the integral of the actual state variables and the torques of the two-wheeled robots between the third moment and the fourth moment;
[0131] The eighth intermediate matrix includes the integral of the actual state variables between the third time instant and the fourth time instant.
[0132] The third moment and the fourth moment are two different sampling values within the second time period. Optionally, the sampling rules of the first moment and the third moment are the same. Optionally, the sampling rules of the second moment and the fourth moment are the same.
[0133] Step 508: Obtain an angle deviation matrix and a noise deviation matrix according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the error linear function.
[0134] For example, the optimal feedback gain K * , the optimal variable matrix P * , uncertainty D and error linear function Satisfies the following equation:
[0135] Where α is a scalar and satisfies And the above equation (6), is a basis of Z. Then the angle deviation matrix Z and the noise deviation matrix T are determined by the above equations.
[0136] Step 509: Obtain a system compensation value according to the optimal feedback gain, the angle deviation matrix, and the noise deviation matrix.
[0137] For example, according to the optimal feedback gain K * , angle deviation matrix Z and noise deviation matrix T, and obtain the system compensation value L=K * Z+T.
[0138] Step 510: Obtain the control torque of the two-wheeled robot according to the optimal feedback gain, the second state variable and the system compensation value.
[0139] For example, according to the optimal feedback gain K * , the second state variable ζ and the system compensation value L, the control torque τ of the two-wheeled robot is obtained as -K * ζ+L.
[0140] Step 511: Control the two-wheeled robot according to the control torque.
[0141] In some embodiments, as shown in FIG1 , the torques of motors 111 , 112 , 113 , 114 , 121 , and 131 are controlled according to the control torque so that the two-wheeled robot remains stationary in a balanced state.
[0142] In summary, the embodiment of the present application obtains the optimal feedback gain, the optimal variable matrix and the uncertainty based on the first state variable and the first feedback gain of the two-wheeled robot. Then, based on the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot, the angle deviation matrix and the noise deviation matrix are calculated. Then, using the second state variable, the optimal feedback gain, the angle deviation matrix and the noise deviation matrix, the control torque of the two-wheeled robot is obtained, and finally the two-wheeled robot is controlled by the control torque. This method allows the two-wheeled robot to remain stationary or move within a very small range, thereby improving the stability and safety of the two-wheeled robot.
[0143] Furthermore, the balance controllers of these robots can be automatically updated online, enabling them to achieve optimal control and remain stationary or move within a very small range. This improves the stability and safety of two-wheeled robots and enables their use in scenarios requiring precise operation with a stable chassis.
[0144] In the embodiment of the present application, it is necessary to determine the optimal solution (K * , P *) and (Z, T). The first step is to determine the optimal feedback gain K * The method is to iteratively solve the optimization problem by collecting ζ(t) and τ(t). In the embodiment of the present application, the dependence on A is removed by the Lyapunov equation:
[0145] Where j is the iteration index. At the same time, the dependence on B is removed by the following gain iteration: K j+1 =R -1 B T P j .
[0146] In each iteration, D is set as the variable determined in each iteration. When K and P converge, the converged value is the optimal solution K. * and P * .
[0147] To determine the parameters Z and T, a basis for Z is defined as Such that there exists a scalar α that satisfies And (6). Define a Sylvester mapping S: R n →R n , so that S(Z)=-AZ, then:
[0148] Among them, B uses K * and P * It means that D can be solved by the previous steps.
[0149] exist When provided, (Z, T) can be solved by the following equation:
[0150] By setting L=K * Z + T and τ = -K * ζ+L, we get the control torque τ.
[0151] In summary, this embodiment provides a proof process for calculating the control torque τ. Through the above proof process, a complete process for calculating the control torque can be obtained, providing a theoretical basis for calculating the control torque.
[0152] In the following embodiments, a control method for a two-wheeled robot provided by an embodiment of the present application will be introduced in the form of pseudo code, as shown below:
[0153] 1. Apply initial stabilization control, τ = -K0ζ + β, where the detection noise β(t) is in [t0, t s ] to collect data.
[0154] 2. Calculate equations (9), (10), (11), (12), (13), (14), (15), and (16).
[0155] 3. Determine whether the full rank condition holds:
[0156] 4. Set j = 0.
[0157] 5. Set up a loop and let ||P j+1 -P j ||<ε is the loop end condition, and ε is any positive real number.
[0158] 6. Solve P by the following formula j , K j+1 and D:
[0159] in,
[0160] 7. End the loop.
[0161] 8. Set K * =K j+1 , P * =P j .
[0162] 9. Solve it by the following formula
[0163] in,
[0164] 10. Solve Z and T using equation (17).
[0165] 11. Let L = K * Z+T, then the control torque output by the two-wheeled robot is τ=-K * ζ+L.
[0166] In summary, the embodiment of the present application obtains the optimal feedback gain, the optimal variable matrix and the uncertainty based on the first state variable and the first feedback gain of the two-wheeled robot. Then, based on the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot, the angle deviation matrix and the noise deviation matrix are calculated. Then, the second state variable, the optimal feedback gain, the angle deviation matrix and the noise deviation matrix are used to obtain the control torque of the two-wheeled robot, and finally the two-wheeled robot is controlled by the control torque. This method allows the two-wheeled robot to remain stationary or move within a very small range, thereby improving the stability and safety of the two-wheeled robot.
[0167] The present application embodiments train a data-driven optimal output regulation controller for a two-wheeled robot in four scenarios to handle uncertainties in the model and disturbances. In the related art, two-wheeled robots can maintain balance but cannot remain stationary, which is a limitation of the related art. Therefore, in the first and second scenarios, the stability issue is addressed when the robot is at heights of 0.33m and 0.5m. In addition, the present application also sets up two more challenging scenarios. In the third scenario, the present application installs a 3.5kg eccentric load on the front of the base in f. Since the floating base weighs approximately 11kg, the heavy load will significantly change the balance point of the two-wheeled robot. In the fourth scenario, the present application trains the two-wheeled robot on a slope. Obviously, the two-wheeled robot requires additional torque to compensate for the direct slope factor, which means that the balance point of the two-wheeled robot changes. It should be noted that information about the load (e.g., mass, shape, position) and slope (e.g., grade) is not used in the training process; they are treated as unknown disturbances.
[0168] During training, an initial gain K0 = [-74 -26 -10] is used. When the controller is in a stable state, the two-wheeled robot can move forward and / or backward repeatedly according to the controller, and the detection noise β(t) = 1.6sin(8πt) + 0.8cos(12πt) is used to obtain more information data. Sufficient training data was collected in each experiment, and it is easy to meet the full rank condition of the present application. In addition, the robustness of the method provided in the embodiment of the present application ensures convergence to a small neighborhood of the optimal solution when using noisy data. Figures 6 and 7 show the training data when the robot height is 0.33m and the robot height is 0.5m, respectively, where the oscillation of the curve means the presence of exploration noise.
[0169] Finally, by setting Q = diag(900, 400, 150), R = 1 and ε = 10 -4 In the method provided in this application, the control parameters of the above four scenarios converge as follows:
[0170] L a =-4.21;
[0171] L b =-1.78;
[0172] L c =-5.97;
[0173] L d =1.30;
[0174] The above convergence values are achieved in iterations 19, 18, 16, and 21, respectively. Referring to FIG8 , the fast convergence feature enables the algorithm of this application to be implemented online.
[0175] Because the pitch angle adjustment of the two-wheeled robot is too large, the motor input of the two-wheeled robot is oscillating. The embodiment of the present application has reduced the first diagonal term of Q accordingly. In addition, through manual testing, the convergence of the algorithm is most sensitive to the third diagonal term of Q, and its feasible range is 90 to 280. In addition, the second diagonal of Q should be greater than 180, and the first diagonal can be any positive value. These results show the robustness of the algorithm provided by the embodiment of the present application to the convergence of parameters Q and R.
[0176] Using the algorithm of this application, a trained controller can update the motion state of a two-wheeled robot online after data acquisition. Here, we directly compare the related art (which uses an initial feedback gain K0 to control the two-wheeled robot) with the method provided by the embodiment of this application (also known as AOOR, Adaptive Optimal Output Regulation) to avoid the impact of motion and exploration noise on vision during training. In the first scenario, the two-wheeled robot is at a height of 0.33m. The related art is first used to force the two-wheeled robot to stand still using a remote control. After releasing the remote control, the robot moves forward continuously for the first two seconds, as shown by the curve shown in Figure 9(c). Then, by enabling the method provided by the embodiment of this application at t = 2 seconds, the robot decelerates sharply and remains stationary for the next six seconds, as shown by the curve shown in Figure 9(c). To achieve rapid adjustment, the motor input oscillates slightly, but the impact on the pitch angle (see Figure 9(a)) and linear velocity (see Figure 9(c)) is acceptable. According to test data, the average velocity when using AOOR is much slower than the initial case, resulting in smaller displacements over a longer period of time. The small displacement generated during the use of the method provided in the embodiment of the present application is caused by the initial velocity converging to zero, which is inevitable. The test process of the robot at a height of 0.5m and under load is similar. According to the test data (Figures 10 and 11), after the method provided in the embodiment of the present application is enabled, the robot slows down and stops. For the slope test, the method is similar. The difference is that the method provided in the embodiment of the present application is used at the beginning, and then the relevant technology is used for comparison. The reason is that if the relevant technology is used at the beginning, the robot may quickly leave the slope before the method provided in the embodiment of the present application is enabled. The data (Figure 12) shows that the method provided in the embodiment of the present application has excellent adjustment performance. Table 1 summarizes the experimental results of the present application and the relevant technology. The smaller displacement of the method provided in the present application over a longer period of time shows that the method provided in the present application has a stronger adjustment ability.
[0177] Table 1 Experimental results of this application and related technologies
[0178] The following is an embodiment of the device of the present application. For details not described in detail in the embodiment of the device, reference can be made to the corresponding records in the above method embodiment, and no further details will be given herein.
[0179] FIG13 shows a schematic diagram of a control device for a two-wheeled robot according to an exemplary embodiment of the present application. The device can be implemented as all or part of a computer device through software, hardware, or a combination of both. The device 1300 includes:
[0180] A calculation module 1301 is configured to calculate an optimal feedback gain, an optimal variable matrix, and an uncertainty based on a first state variable and a first feedback gain of the two-wheeled robot, wherein the optimal variable matrix is used to represent the degree of gain of the motion state of the two-wheeled robot on the control mode of the two-wheeled robot;
[0181] The calculation module 1301 is further configured to calculate an angle deviation matrix and a noise deviation matrix based on the optimal feedback gain, the optimal variable matrix, the uncertainty, and the second state variable of the two-wheeled robot;
[0182] The calculation module 1301 is further configured to obtain a control torque of the two-wheeled robot according to the second state variable, the optimal feedback gain, the angle deviation matrix, and the noise deviation matrix;
[0183] The control module 1302 is configured to control the two-wheeled robot according to the control torque.
[0184] In an optional design, the calculation module 1301 is further used to obtain the j-th variable matrix through the first state variable and the j+1-th feedback gain, the first feedback gain is the first feedback gain, j is an integer, and the initial value of j is 0; determine the j+2-th feedback gain based on the j+1-th feedback gain; update j to j+1, and repeat the above two steps; when the j-th variable matrix reaches convergence, determine the j-th variable matrix as the optimal variable matrix; determine the j+1-th feedback gain as the optimal feedback gain; determine the uncertainty based on the optimal variable matrix, the optimal feedback gain and the first state variable.
[0185] In an optional design, the calculation module 1301 is also used to determine a first intermediate matrix, a second intermediate matrix and a third intermediate matrix based on the first state variable; obtain a first polynomial of the first equation based on the j+1th feedback gain, the first intermediate matrix, the second intermediate matrix and the third intermediate matrix; obtain a second polynomial of the first equation based on the j+1th feedback gain and the first intermediate matrix; when the first polynomial and the second polynomial are equal, solve the first equation to obtain the jth variable matrix.
[0186] In an optional design, the calculation module 1301 is also used to determine a fourth intermediate matrix based on the first state variable; when the second intermediate matrix, the third intermediate matrix and the fourth intermediate matrix reach full rank, execute the step of obtaining the first polynomial of the first equation based on the j+1th feedback gain, the first intermediate matrix, the second intermediate matrix and the third intermediate matrix.
[0187] In an optional design, the first intermediate matrix includes the difference between the tensor product of the first state variable and the first state variable at the first moment and the tensor product of the first state variable and the first state variable at the second moment; the second intermediate matrix includes the integral of the first state variable and the first state variable between the first moment and the second moment; the third intermediate matrix includes the integral of the first state variable and the torque of the two-wheeled robot between the first moment and the second moment; the fourth intermediate matrix includes the integral of the first state variable between the first moment and the second moment.
[0188] In an optional design, the calculation module 1301 is also used to determine the actual state variable based on the second state variable; obtain the error linear function based on the optimal feedback gain, the optimal variable matrix, the uncertainty and the actual state variable; obtain the angle deviation matrix and the noise deviation matrix based on the optimal feedback gain, the optimal variable matrix, the uncertainty and the error linear function.
[0189] In an optional design, the calculation module 1301 is also used to determine a fourth intermediate matrix, a fifth intermediate matrix and a sixth intermediate matrix based on the actual state variables; obtain a third polynomial of the second equation based on the optimal feedback gain, the optimal variable matrix, the uncertainty, the fourth intermediate matrix, the fifth intermediate matrix and the sixth intermediate matrix; obtain a fourth polynomial of the second equation based on the actual state variables and the fourth intermediate matrix; and solve the second equation when the third polynomial and the fourth polynomial are equal to obtain the error linear function.
[0190] In an optional design, the calculation module 1301 is also used to determine an eighth intermediate matrix based on the actual state variables; and when the sixth intermediate matrix, the seventh intermediate matrix and the eighth intermediate matrix reach full rank, execute the step of obtaining the third polynomial of the second equation based on the optimal feedback gain, the optimal variable matrix, the uncertainty, the fourth intermediate matrix, the fifth intermediate matrix and the sixth intermediate matrix.
[0191] In an optional design, the fifth intermediate matrix includes the difference between the tensor product of the second state variable and the second state variable at the third sub-time and the tensor product of the second state variable and the second state variable at the fourth moment; the sixth intermediate matrix includes the integral of the second state variable and the second state variable between the third moment and the fourth moment; the seventh intermediate matrix includes the integral of the second state variable and the torque of the two-wheeled robot between the third moment and the fourth moment; the eighth intermediate matrix includes the integral of the second state variable between the third moment and the fourth moment.
[0192] In an optional design, the calculation module 1301 is also used to obtain a system compensation value based on the optimal feedback gain, the angle deviation matrix and the noise deviation matrix; and to obtain the control torque of the two-wheeled robot based on the optimal feedback gain, the second state variable and the system compensation value.
[0193] In summary, the embodiment of the present application obtains the optimal feedback gain, the optimal variable matrix and the uncertainty based on the first state variable and the first feedback gain of the two-wheeled robot. Then, based on the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot, the angle deviation matrix and the noise deviation matrix are calculated. Then, the second state variable, the optimal feedback gain, the angle deviation matrix and the noise deviation matrix are used to obtain the control torque of the two-wheeled robot, and finally the two-wheeled robot is controlled by the control torque. This method allows the two-wheeled robot to remain stationary or move within a very small range, thereby improving the stability and safety of the two-wheeled robot.
[0194] Figure 14 is a schematic diagram of a controller according to an exemplary embodiment. The computer device 1400 includes a central processing unit (CPU) 1401, a system memory 1404 including a random access memory (RAM) 1402 and a read-only memory (ROM) 1403, and a system bus 1405 connecting the system memory 1404 and the CPU 1401. The computer device 1400 also includes a basic input / output (I / O) system 1406 that facilitates information transmission between various components within the computer device, and a mass storage device 1407 for storing an operating system 1413, application programs 1414, and other program modules 1415.
[0195] The basic input / output system 1406 includes a display 1408 for displaying information and an input device 1409, such as a mouse or keyboard, for user input. Both the display 1408 and the input device 1409 are connected to the central processing unit 1401 via an input / output controller 1410 connected to the system bus 1405. The basic input / output system 1406 may also include an input / output controller 1410 for receiving and processing input from a variety of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1410 also provides output to a display screen, printer, or other types of output devices.
[0196] The mass storage device 1407 is connected to the central processing unit 1401 via a mass storage controller (not shown) connected to the system bus 1405. The mass storage device 1407 and its associated computer-readable medium provide non-volatile storage for the computer device 1400. In other words, the mass storage device 1407 may include computer-readable media (not shown) such as a hard disk or a CD-ROM drive.
[0197] Without loss of generality, the computer device readable medium may include computer device storage media and communication media. Computer device storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer device readable instructions, data structures, program modules or other data. Computer device storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), CD-ROM, Digital Video Disc (DVD) or other optical storage, tape cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer device storage media are not limited to the above-mentioned ones. The above-mentioned system memory 1404 and mass storage device 1407 can be collectively referred to as memory.
[0198] According to various embodiments of the present disclosure, the computer device 1400 may also be connected to a remote computer device on a network such as the Internet for operation. That is, the computer device 1400 may be connected to the network 1411 via the network interface unit 1412 connected to the system bus 1405, or the network interface unit 1412 may be used to connect to other types of networks or remote computer device systems (not shown).
[0199] The memory also includes one or more programs, which are stored in the memory. The central processing unit 1401 implements all or part of the steps of the above-mentioned two-wheeled robot control method by executing the one or more programs.
[0200] In addition, an embodiment of the present application further provides a storage medium, which is used to store a computer program, and the computer program is used to execute the control method of the two-wheeled robot provided in the above embodiment.
[0201] An embodiment of the present application also provides a computer program product including a computer program, which, when executed on a computer, enables the computer to execute the control method of the two-wheeled robot provided in the above embodiment.
[0202] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0203] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0204] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A control method for a two-wheeled robot, the method being executed by a control unit, the method comprising: Calculate the optimal feedback gain, the optimal variable matrix and the uncertainty according to the first state variable and the first feedback gain of the two-wheeled robot, wherein the optimal variable matrix is used to represent the gain degree of the motion state of the two-wheeled robot on the control mode of the two-wheeled robot; Calculating an angle deviation matrix and a noise deviation matrix according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot; Obtaining a control torque of the two-wheeled robot according to the second state variable, the optimal feedback gain, the angle deviation matrix and the noise deviation matrix; The two-wheeled robot is controlled according to the control torque.
2. The method according to claim 1, wherein the optimal feedback gain, the optimal variable matrix and the uncertainty are calculated according to the first state variable and the first feedback gain of the two-wheeled robot, comprising: A j-th variable matrix is obtained through the first state variable and the j+1-th feedback gain, the first feedback gain is the first feedback gain, j is an integer, and the initial value of j is 0; determining the j+2th feedback gain according to the j+1th feedback gain; Update j to j+1 and repeat the above two steps; When the j-th variable matrix reaches convergence, the j-th variable matrix is determined as the optimal variable matrix; and the j+1-th feedback gain is determined as the optimal feedback gain; The uncertainty is determined according to the optimal variable matrix, the optimal feedback gain and the first state variable.
3. The method according to claim 2, wherein obtaining the j-th variable matrix through the first state variable and the j+1-th feedback gain comprises: Determine a first intermediate matrix, a second intermediate matrix and a third intermediate matrix according to the first state variable; Obtaining a first polynomial of a first equation according to the j+1th feedback gain, the first intermediate matrix, the second intermediate matrix and the third intermediate matrix; Obtaining a second polynomial of the first equation according to the j+1th feedback gain and the first intermediate matrix; When the first polynomial and the second polynomial are equal, the first equation is solved to obtain the j-th variable matrix.
4. The method according to claim 3, further comprising: determining a fourth intermediate matrix according to the first state variable; When the second intermediate matrix, the third intermediate matrix and the fourth intermediate matrix reach full rank, the step of obtaining the first polynomial of the first equation according to the j+1th feedback gain, the first intermediate matrix, the second intermediate matrix and the third intermediate matrix is performed.
5. The method according to claim 4, wherein the first intermediate matrix comprises a difference between a tensor product of the first state variable and the first state variable at a first moment and a tensor product of the first state variable and the first state variable at a second moment; The second intermediate matrix includes the first state variable between the first moment and the second moment and the integral of the first state variable; The third intermediate matrix includes the integral of the first state variable and the torque of the two-wheeled robot between the first moment and the second moment; The fourth intermediate matrix includes the integral of the first state variable between the first time instant and the second time instant.
6. The method according to any one of claims 1 to 5, wherein the calculating of the angle deviation matrix and the noise deviation matrix according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable comprises: determining an actual state variable according to the second state variable; Obtaining an error linear function according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the actual state variable; The angle deviation matrix and the noise deviation matrix are obtained according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the error linear function.
7. The method according to claim 6, wherein the error linear function is obtained according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the actual state variable, comprising: Determine a fourth intermediate matrix, a fifth intermediate matrix and a sixth intermediate matrix according to the actual state variables; Obtaining a third polynomial of the second equation according to the optimal feedback gain, the optimal variable matrix, the uncertainty, the fourth intermediate matrix, the fifth intermediate matrix and the sixth intermediate matrix; Obtaining a fourth polynomial of the second equation according to the actual state variable and the fourth intermediate matrix; When the third polynomial and the fourth polynomial are equal, the second equation is solved to obtain the error linear function.
8. The method according to claim 7, further comprising: determining an eighth intermediate matrix according to the actual state variables; When the sixth intermediate matrix, the seventh intermediate matrix and the eighth intermediate matrix reach full rank, the step of obtaining the third polynomial of the second equation according to the optimal feedback gain, the optimal variable matrix, the uncertainty, the fourth intermediate matrix, the fifth intermediate matrix and the sixth intermediate matrix is performed.
9. The method according to claim 8, The fifth intermediate matrix includes a difference between a tensor product of the actual state variable and the actual state variable at a third moment and a tensor product of the actual state variable and the actual state variable at a fourth moment; The sixth intermediate matrix includes the actual state variables between the third moment and the fourth moment and the integral of the actual state variables; The seventh intermediate matrix includes the integral of the actual state variables and the torque of the two-wheeled robot between the third moment and the fourth moment; The eighth intermediate matrix includes the integral of the actual state variables between the third time instant and the fourth time instant.
10. The method according to any one of claims 1 to 9, wherein obtaining the control torque of the two-wheeled robot according to the second state variable, the optimal feedback gain, the angle deviation matrix and the noise deviation matrix comprises: Obtaining a system compensation value according to the optimal feedback gain, the angle deviation matrix and the noise deviation matrix; The control torque of the two-wheeled robot is obtained according to the optimal feedback gain, the second state variable and the system compensation value.
11. A control device for a two-wheeled robot, the device comprising: A calculation module, used for calculating an optimal feedback gain, an optimal variable matrix and uncertainty according to a first state variable and a first feedback gain of the two-wheeled robot, wherein the optimal variable matrix is used for indicating the gain degree of the motion state of the two-wheeled robot on the control mode of the two-wheeled robot; The calculation module is further used to calculate an angle deviation matrix and a noise deviation matrix according to the optimal feedback gain, the optimal variable matrix, the uncertainty and the second state variable of the two-wheeled robot; The calculation module is further used to obtain the control torque of the two-wheeled robot according to the second state variable, the optimal feedback gain, the angle deviation matrix and the noise deviation matrix; A control module is used to control the two-wheeled robot according to the control torque.
12. A robot, comprising a processor, wherein the processor is used to load and execute the control method for a two-wheeled robot according to any one of claims 1 to 10.
13. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is loaded and executed by a processor to implement the control method of the two-wheeled robot according to any one of claims 1 to 10.
14. A chip product, comprising a computer program or an instruction, wherein when the computer program or the instruction is executed by a processor, the control method of the two-wheeled robot according to any one of claims 1 to 10 is implemented.
15. A computer program product comprising a computer program, which, when executed on a computer, enables the computer to execute the control method of the two-wheeled robot according to any one of claims 1 to 10.
