Method for dynamically stabilizing upper body of robot during walking

Optimize the robot's upper body posture compensation through policy gradient learning, and use Softmax and Gauss functions for parameterization. This solves the problem of poor upper body posture compensation in the existing technology, achieves rapid and precise posture adjustment when the robot walks, and improves dynamic stability. sex.

CN118625845APending Publication Date: 2024-09-10SHANGHAI NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410624980.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-10

Smart Images

  • Figure CN118625845A
    Figure CN118625845A
Patent Text Reader

Abstract

The invention relates to a method for dynamically stabilizing the upper body of a robot during walking, which belongs to the field of robot motion control and comprises the following steps of: S1, starting the robot and initializing motion parameters; s2, the robot starts to walk; s3, judging whether the posture of the upper body of the robot reaches a compensation point or not, if yes, entering S4, and otherwise, returning to S2; s4, performing attitude compensation on the robot through the upper body attitude compensation model; s5, updating the posture compensation times, detecting whether the posture of the upper body recovers to be vertical or not, if yes, entering the step S6, and if not, returning to the step S4; and S6, calibrating the posture of the robot, and returning to the step S2. The attitude compensation of the upper body of the robot during walking is realized through strategy gradient learning, and the method has the dual advantages of accurate compensation and rapid operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a method for dynamically stabilizing the upper body of a walking robot, and belongs to the field of robot motion control. Background Art

[0002] In the research of bipedal robots, dynamic stability refers to the need to maintain sufficient stability when the robot encounters large disturbances in task scenarios such as external force impact, sudden change in ground height, etc. When walking, the upper body of humans is always in a vertical state, and the whole body maintains a dynamic balance state. If there is a sudden disturbance such as stepping on air, the center of gravity of humans will move forward. At this time, there are two balance control strategies for humans. One is to directly adjust the upper body posture back to the vertical state, and the other is to take a few steps forward to return the upper body to the vertical state. The main purpose of these two methods is to adjust the upper body back to the vertical state. Therefore, this balance control strategy can be applied to bipedal robots, so that when the robot encounters large disturbances, it can maintain a dynamically stable state by adjusting the upper body posture.

[0003] Upper body posture compensation is mainly carried out by control algorithms. Currently, the most commonly used posture compensation algorithms for robots are manual tuning and genetic algorithms. The advantage of manual tuning is that the calculation is simple, so it can achieve lower latency in real-time control. The disadvantage is that the posture compensation parameters repeatedly tested and adjusted by engineers can only meet specific scenarios and are not generalizable. Once the external scenario changes, the compensation parameters are no longer applicable. The advantage of genetic algorithms is that they are good at global search and can find the optimal posture compensation parameters for robots. The disadvantage is that the convergence speed is slow, and a long period of online calculation is required to obtain the optimal solution, and the real-time performance of the algorithm is weak. Summary of the invention

[0004] The purpose of this application is to solve the problem of poor upper body posture compensation when a robot is walking, and to provide a method for dynamic stabilization of the upper body of a robot walking, and to optimize the upper body posture compensation through a specific posture compensation algorithm to improve the walking stability of the robot.

[0005] The technical solution is as follows:

[0006] A method for dynamically stabilizing the upper body of a walking robot comprises the following steps:

[0007] Step S1: The robot starts and initializes motion parameters;

[0008] Step S2: the robot starts walking;

[0009] Step S3: Determine whether the upper body posture of the robot reaches the compensation point. If it reaches the compensation point, go to S4, otherwise return to step S2;

[0010] Step S4: performing posture compensation on the robot through the upper body posture compensation model;

[0011] Step S5: Update the number of posture compensation times and detect whether the upper body posture is restored to vertical. If yes, go to step S6, otherwise go back to S4;

[0012] Step S6: Calibrate the posture of the robot and return to step S2.

[0013] Furthermore, the motion parameters in step S1 include the pitch angle and roll angle of the robot hip joint; the measured center of mass position, reference center of mass position, measured foothold position and reference foothold position of the x-axis and y-axis.

[0014] Furthermore, posture compensation using the upper body posture compensation model includes the following steps:

[0015] Step S41: Determine the parameterized form of the policy function in the task scenario. The discrete action space is parameterized as a Softmax function form, and the continuous action space is parameterized as a Gauss function form.

[0016] Step S42: setting the number of iterations and performing multiple iterations. In each iteration, using the current strategy to interact with the environment, collecting sample data, including state, action, and reward information;

[0017] Step S43: Estimate the policy gradient value based on the collected samples and the score function, and update the policy parameters according to the estimated policy gradient value to maximize the expected cumulative reward;

[0018] Step S44: Continuously iterate until a preset number of iterations is reached or the function converges, and input the corresponding data into the drive motors of the upper body joints of the robot to complete the upper body posture compensation.

[0019] Furthermore, estimating the policy gradient value in step S43 includes the following steps:

[0020] Step S431: The output pitch angle Δθ of the robot upper body posture reflector pitch and roll angle compensation value Δθ roll Set to: in and x c ref is the measured center of mass position and the reference center of mass position of the robot's x-axis, and x z ref is the measured foothold position and reference foothold position of the robot's x-axis, y c , andz ref is the measured center of mass position, reference center of mass position, measured foothold position and reference foothold position of the robot y axis, G xc , G xz , G yc , G yz are the gain weights of the x-axis and y-axis of the robot’s upper body posture reflector, respectively;

[0021] Step S432: define a policy parameter set G=[G xc G xz G yc G yz ], in order to ensure that the upper body of the robot has a better adjustment posture after being subjected to a large disturbance, the center of mass error and the error of the zero moment point are used as indicators to construct the objective function:

[0022]

[0023] where w x and w y is the weight factor of the center of mass error and the zero moment point error, w p and w r is the weight factor of pitch angle and roll angle;

[0024] Step S433: define an initial parameter set such as G = [0 0 0 0], and randomly generate p strategies near the parameter set, where the number of p is proportional to the size of the parameter set. The generation formula is as follows: G p =G+[-α, 0, +α];

[0025] Step S434: Divide the obtained strategies into three groups: G -α , G 0 , G +α , and then calculate the average score through the evaluation function. If and Take the policy gradient value ▽K as 0, otherwise take the policy gradient value

[0026] Step S435: Orthogonalize the policy gradient value and multiply it by the iteration factor b to obtain the processed policy gradient value, and subtract the processed gradient value from the original parameter set to obtain the value of this round of iteration.

[0027] Furthermore, in step S5, a posture compensation threshold is preset, and if the number of posture compensation times reaches the threshold, the robot stops walking and outputs an alarm message.

[0028] Beneficial Effects

[0029] The present invention realizes posture compensation of the upper body of the robot when walking through policy gradient learning, and has the dual advantages of accurate compensation and fast operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic diagram of the overall process of the present invention; DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. The directions or positional relationships indicated by the terms "upper", "lower", "front", "back", "left", "right", "bottom", "inside", "outside", etc. are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention:

[0032] like Figure 1 As shown, a method for dynamically stabilizing the upper body of a walking robot comprises the following steps:

[0033] Step S1: The robot starts and initializes motion parameters;

[0034] Step S2: the robot starts walking;

[0035] Step S3: Determine whether the upper body posture of the robot reaches the compensation point. If it reaches the compensation point, go to S4, otherwise return to step S2;

[0036] Step S4: performing posture compensation on the robot through the upper body posture compensation model;

[0037] Step S5: Update the number of posture compensation times and detect whether the upper body posture is restored to vertical. If yes, go to step S6, otherwise go back to S4;

[0038] Step S6: Calibrate the posture of the robot and return to step S2.

[0039] The motion parameters in step S1 include the pitch angle and roll angle of the robot hip joint; the measured center of mass position, reference center of mass position, measured foothold position and reference foothold position of the x-axis and y-axis.

[0040] Posture compensation using the upper body posture compensation model includes the following steps:

[0041] Step S41: Determine the parameterized form of the policy function in the task scenario. The discrete action space is parameterized as a Softmax function form, and the continuous action space is parameterized as a Gauss function form.

[0042] Step S42: setting the number of iterations and performing multiple iterations. In each iteration, using the current strategy to interact with the environment, collecting sample data, including state, action, and reward information;

[0043] Step S43: Estimate the policy gradient value based on the collected samples and the score function, and update the policy parameters according to the estimated policy gradient value to maximize the expected cumulative reward;

[0044] Step S44: Continuously iterate until a preset number of iterations is reached or the function converges, and input the corresponding data into the drive motors of the upper body joints of the robot to complete the upper body posture compensation.

[0045] Estimating the policy gradient value in step S43 includes the following steps:

[0046] Step S431: The output pitch angle Δθ of the robot upper body posture reflector pitch and roll angle compensation value Δθ roll Set to: in and x c ref is the measured center of mass position and the reference center of mass position of the robot's x-axis, and x z ref is the measured foothold position and reference foothold position of the robot's x-axis, y c , and z is the measured center of mass position, reference center of mass position, measured foothold position and reference foothold position of the robot y axis, G xc , G xz , G yc , G yz are the gain weights of the x-axis and y-axis of the robot’s upper body posture reflector, respectively;

[0047] Step S432: define a policy parameter set G=[G xc G xz G yc G yz ], in order to ensure that the upper body of the robot has a better adjustment posture after being subjected to a large disturbance, the center of mass error and the error of the zero moment point are used as indicators to construct the objective function:

[0048]

[0049] where w x and w y is the weight factor of the center of mass error and the zero moment point error, w p and w r is the weight factor of pitch angle and roll angle;

[0050] Step S433: define an initial parameter set such as G = [0 0 0 0], and randomly generate p strategies near the parameter set, where the number of p is proportional to the size of the parameter set. The generation formula is as follows: G p =G+[-α, 0, +α], for example, let the initial parameter set be G=[0 0 0 0], W x =0.5,W y =0.5,W p =0.5,W r =0.5, α=0.01, b=0.01;

[0051] Step S434: Divide the obtained strategies into three groups: G -α , G 0 , G +α , and then calculate the average score through the evaluation function. If and Take the policy gradient value ▽K as 0, otherwise take the policy gradient value

[0052] Step S435: Orthogonalize the policy gradient value and multiply it by the iteration factor b to obtain the processed policy gradient value, and subtract the processed gradient value from the original parameter set to obtain the value of this round of iteration.

[0053] In step S5, a posture compensation threshold is pre-set. If the number of posture compensation times reaches the threshold, the robot stops walking and outputs an alarm message.

[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the principles and spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for dynamically stabilizing the upper body of a walking robot, comprising the following steps: Step S1: The robot starts and initializes motion parameters; Step S2: the robot starts walking; Step S3: Determine whether the upper body posture of the robot reaches the compensation point. If it reaches the compensation point, go to S4, otherwise return to step S2; Step S4: performing posture compensation on the robot through the upper body posture compensation model; Step S5: Update the number of posture compensation times and detect whether the upper body posture is restored to vertical. If yes, go to step S6, otherwise go back to S4; Step S6: Calibrate the posture of the robot and return to step S2.

2. The method for dynamically stabilizing the upper body of a walking robot according to claim 1, characterized in that: The motion parameters in step S1 include the pitch angle and roll angle of the robot's hip joint; the measured center of mass position, reference center of mass position, measured foothold position and reference foothold position of the x-axis and y-axis.

3. The method for dynamically stabilizing the upper body of a walking robot according to claim 1, characterized in that: Posture compensation using the upper body posture compensation model includes the following steps: Step S41: Determine the parameterized form of the policy function in the task scenario. The discrete action space is parameterized as a Softmax function form, and the continuous action space is parameterized as a Gauss function form. Step S42: setting the number of iterations and performing multiple iterations. In each iteration, using the current strategy to interact with the environment, collecting sample data, including state, action, and reward information; Step S43: Estimate the policy gradient value based on the collected samples and the score function, and update the policy parameters according to the estimated policy gradient value to maximize the expected cumulative reward; Step S44: Continuously iterate until a preset number of iterations is reached or the function converges, and input the corresponding data into the drive motors of the upper body joints of the robot to complete the upper body posture compensation.

4. The method for dynamically stabilizing the upper body of a robot walking as claimed in claim 3, characterized in that: Estimating the policy gradient value in step S43 includes the following steps: Step S431: The output pitch angle and roll angle compensation values ​​of the robot upper body posture reflector are set to: in and x c ref is the measured center of mass position and the reference center of mass position of the robot's x-axis, and x z ref is the measured foothold position and reference foothold position of the robot's x-axis, y c , and z ref is the measured center of mass position, reference center of mass position, measured foothold position and reference foothold position of the robot y axis, G xc , G xz , G yc , G yz are the gain weights of the x-axis and y-axis of the robot’s upper body posture reflector, respectively; Step S432: define a policy parameter set G=[G xc G xz G yc G yz ], in order to ensure that the upper body of the robot has a better adjustment posture after being subjected to a large disturbance, the center of mass error and the error of the zero moment point are used as indicators to construct the objective function: where w x and w y is the weight factor of the center of mass error and the zero moment point error, w p and w r is the weight factor of pitch angle and roll angle; Step S433: define an initial parameter set such as G = [0 0 0 0], and randomly generate p strategies near the parameter set, where the number of p is proportional to the size of the parameter set. The generation formula is as follows: G p =G+[-α,θ,+α]; Step S434: Divide the obtained strategies into three groups: G -α , G0, G +α , and then calculate the average score through the evaluation function. If and Get the policy gradient value is 0, otherwise take the policy gradient value Step S435: Orthogonalize the policy gradient value and multiply it by the iteration factor b to obtain the processed policy gradient value, and subtract the processed gradient value from the original parameter set to obtain the value of this round of iteration.

5. The method for dynamically stabilizing the upper body of a walking robot as claimed in claim 1, characterized in that: In step S5, a posture compensation threshold is pre-set. If the number of posture compensation times reaches the threshold, the robot stops walking and outputs an alarm message.