Motion design and Stability study of Biped Robot

Biped robot is one of many kinds of humanoid robot, with upper and lower limb structure of multiple degrees of freedom, humanoid appearance and friendly human-computer interaction interface. Robobasic programming language is used to set the rotation angle and direction of each steering gear, so as to carry out motion design and flexibly control the robot. Then, through the theoretical analysis of zero moment point (ZMP), the ideal motion trajectory of the robot in different environments can be determined to ensure that the robot can realize simple machine movements similar to those of human beings on the basis of stable motion.


1.The introduction
With the continuous progress of science and technology, the development of new things, artificial intelligence technology gradually tends to mature. It has human-like appearance and can provide enjoyment and interest for human entertainment. The research of biped robot focuses on many subjects such as machinery, electronic, computer, sensor and bionics, and is the discussion of the combination of multi-disciplines and technologies [1]. Based on the study of the stability theory of biped robots, this paper designs the movements and realizes the dance movements.

2.Stability study
In the process of movement, only two feet can touch the ground and the contact area is small, while the center of gravity of the robot is relatively high, so it is easy to fall down during dynamic walking or dancing. Therefore, how to make the biped robot walk stably is a key problem. The basic motion state of biped robot is walking, which can be divided into static walking and dynamic walking. ZMP is adopted as the criterion for biped robot's stable walking in this article.

2.1.ZMP stability criterion
ZMP was first defined by the yugoslav scholar Vukobratovic in the theory of dynamic balance of walking robots in 1968 [2]. The proposal of ZMP is an important basis for judging dynamic equilibrium. ZMP is a point on the ground, and the moment of force of gravity and inertia of the robot on that point, its horizontal component is zero. That is, the torque applied to the ground by the entire system at the point forward and laterally is zero. If the ZMP falls within the range between the two feet, the robot can walk stably.

Static walking analysis
Static walking means that the biped robot is always in a static equilibrium state during the walking process. That is, the center of gravity projection of the biped robot is always in the stable region where the supporting surface is located. While the support surface refers to the range of two feet, which is the polygonal area enclosed by both feet on the ground. When the right foot is raised halfway, the stable area is shown in figure 1. The stable area when the right foot is fully raised is the contact area between the left foot and the ground as shown in figure 2. The stable area where both feet are in contact with the ground is shown in figure 3. The reason why static walking is considered to be in equilibrium all the time is that the speed and acceleration of each part of the bar are relatively small under the equilibrium state. It can ignore the work of inertial force, and then the instant speed and friction force between the ball of the foot and the ground are also ignored, so the stability is easier to control [3]. When the robot is in static or static equilibrium, its ZMP and barycenter projection remain the same. As shown in figure  4.

Dynamic walking analysis
Dynamic walking means that the robot adopts a high-speed walking mode. Dynamic walking, that is to say, the speed and acceleration of each member of the robot is relatively large, showing a high-speed operation mode. The magnitude of its center of gravity and acceleration changes from time to time, and the inertial force generated in the forward and lateral direction is not easy to control, which destroys the static equilibrium state and makes the stability difficult to control. When the robot walks at a higher speed, the projection point of the inertial force and the center of gravity on the ground cannot be guaranteed to always coincide with the ZMP, as shown in figure 5.  Figure 4. Static walking. Figure 5. Dynamic walking.

Measurement and calculation of ZMP
In the process of robot dynamic walking, the condition to keep the robot moving stably is that ZMP always falls in the polygonal support surface with both feet constantly moving and changing. When ZMP falls outside the support area, the robot will be unstable and fall down. The desired ZMP can be calculated according to the actual structure size, volume size, joint mass and gait planning of the robot. The actual ZMP requires multiple pressure sensors mounted on the robot's foot for measurement. By measuring the pressure value of each discrete point on each sensor and calculating, the coordinate point of ZMP can be obtained. Among them, is the mass of each link of the robot, F x , F y and F z are the component forces of the x-axis, y-axis and z-axis respectively, ẍi，ÿi，̈ is the centroid acceleration of each link of the robot, (1) Among them, ( , , 0) is the coordinates of the robot ZMP point. When the robot is in dynamic equilibrium, the effect of inertial force is not considered. That is, the centroid acceleration of each member can be negated to zero, so ̈=̈=̈=0. Since ( , ,0) is the coordinate of the robot ZMP point, z=0 is substituted into the formula (1) and (2) to obtain the following results.
According to formula (3) and (4), the centroid coordinate of the biped robot under static walking is ZMP. So static walking is a special state of dynamic walking. When walking in a static state, as long as the projection of the robot's center of gravity on the ground falls in the stable region, the robot can maintain good stability.
The actual ZMP needs to install pressure sensors on the double feet of the robot, and the actual coordinate position of ZMP can be obtained through the pressure value feedback by the sensor.

Robot attributes
The research object of this paper adopts a robot with 17 degrees of freedom, and the distribution of degrees of freedom is shown in figure 6. Its 17 degrees of freedom are distributed in the legs, arms and head. There are 5 steering gears on each leg, the left leg is controlled by the 0-4 servo, and the right leg is controlled by 12-16. There are three steering gears in each arm, the left arm is controlled by the 5-7 steering gear, and the right arm is controlled by the 9-11th. The head is controlled by the no.8 steering gear, and it can rotate flexibly. Through the control of 17 degrees of freedom, the movement of the dance robot can be well controlled to achieve dynamic balance.

Software development environment
The programming environment of the biped robot is roboBASIC. Robobasic is a special programming language developed for the convenience of robot control on the basis of general Basic programming language.
The basic movement instructions of the robot can be completed by roboBASIC, which can directly control the rotation direction and angle of a single steering gear, and can also group several steering gea and control each steering gear separately, and obtain the angle value of the steering gear in real time. Through the grouping of the steering gear, it is possible to operate multiple sets of steering gear at the same time, which greatly facilitates the control of the steering gear. Among them, the steering gear controlling the left leg is assigned to the G6A group, the right leg to the G6D group, the left arm to the G6B group, and the right arm to the G6C group.
The roboBASIC programming language mainly includes declaration commands, flow control commands, input and output commands, motor control commands, header files, and action functions. The user customizes some robot actions, and then realizes the action function through the roboBASIC grammar, and adds the appropriate delay between each function, a basic control robot program is completed [5]. In this paper, the DIR instruction is mainly used in the design of simple actions for the declaration of variables; GOSUB instruction for calling subroutines; SPEED command for setting the speed of the servo motor; The ON...GOTO function is used to process the instructions of the jump program.

design method
There are two methods for designing robot dance movements: intuitive prediction and movement teaching. Intuitive prediction is to roughly predict the motion parameters of each joint and the delay time of adjacent motions based on the movements of real people. Through programming language, the humanoid robot movement can be downloaded and run. This method has a large error in motion parameters and time, which requires a lot of repeated prediction and debugging. The motion teaching method first places the robot into the desired motion and writes the motion parameters generated by it into the control board through the programming language. After compiling and running, the parameters are adjusted according to the robot's action display results until the completion. The method has small angular error, reduces the number of trials, and avoids motion parameter errors caused by intuitive prediction.
There are two gait planning methods for biped robot, online design and offline design. Among them, the online design mainly depends on the autonomy of the robot, which is difficult to realize. Off-line design is to design each action of the robot in advance and input the angle of each steering gear into the program to complete the action. However, offline design has poor independent ability and is greatly affected by the environment, which is not conducive to design. This experiment combines the two methods, using offline design and online correction method. The off-line design is based on the on-line design, and the motor motion parameters are compiled and downloaded to the MCU control board through the programming language. When the actualized movement effect cannot reach the desired movement, the angle of each steering gear of the robot can be adjusted through online power correction, and the dance movement planning of the robot can be improved step by step.

experimental process
Before the robot action starts, the zero point is set first. That is, the robot reset and zero movement. Set servo motor center angle of 100, minimum angle of 10, maximum angle of 190. In the experimental stage, the off-line design and online modification of gait planning method and motion teaching method are adopted to design the dance movements for the robot. During the movement teaching process, the angles of the various steering gears of the robot are repeatedly adjusted and corrected to complete the entire series of aesthetic actions. Moreover, the stability of the robot in the process of action is guaranteed by continuously calculating the value of ZMP.

dance experiment
The choreography of the biped robot is based on the zero point setting and centered on the teaching method. First, the robot is connected with the communication serial port of the host computer. According to the action designed in the action teaching method, each step of the dance movement of the robot is used to obtain the angle parameter of the steering gear through the software, and the current posture of the robot is captured by the servo motor real-time control window. The motion angle of the posture is programmed by roboBASIC language and downloaded to the main control board of the robot. Finally, the serial line is disconnected, and the robot can control itself to carry out corresponding actions through the data received from the main control board.
On the basis of mastering the basic walking experiment, leg lifting experiment and side step experiment of the robot, a one-minute dance experiment is designed, and the relevant movements of the robot in the process of dance are intercepted. Figure 7 shows the stage of standing preparation, while figure 8 and figure 9 show the stages when the robot left and right steps. The motion range of this process is not large, and the main design is the coordination and consistency of robot movements. of gravity of the robot constantly moves forward and down. If the center of gravity projection falls on the edge of the support surface or beyond the support surface, the robot will wobble up and fall due to the unstable center of gravity. During the design process, the robot's legs need to be spread out at a certain distance, and the angle of the steering gear needs to be adjusted repeatedly to ensure that the center of gravity stays within the support surface. Figure 10. Open arms. Figure 11. Bend down. Figure 12. Take a bow.

Conclusion
This paper grasps the hardware and software characteristics of biped robot and the programming language environment. In addition, through the analysis and research of the stability theory of ZMP, the value of ZMP is constantly calculated during the experiment to ensure that the projection of the gravity center of the robot always stays on the polygonal support surface of the stable region, so that the robot can achieve stable movement. The action teaching method is used to design the action, and finally the robot can display the ornamental dance.