UDC 621.865.8 KH. Araffa, M. Tkach IMPLEMENTATION AND SIMULATION A MODEL PREDICTIVE CONTROL FOR MOTION GENERATION OF BIPED ROBOT

Abstract: This paper dealing with the problem of generation motion of biped robot, to solve this problem, was introduces a new method of implementation a biped robot walking pattern generation by using a Model Predictive control (MPC) First, the basic of biped robots’ motion was reviewed and was discussed the elements of motion controller. The dynamics of a biped robot is modeled as a running cart on a table which gives a convenient representation for generation ZMP trajectory. After reviewing approach of 3D Linear Inverted Pendulum Model, a pattern generator was designed, lastly in MATLAB/Simulink and using Model Predictive Control Toolbox (MPCT) which provides functions, an app, and Simulink blocks was used for designing and simulating a motion generator based on model predictive controllers (MPC). The results of simulation are shown that we can realize such controller for generating trajectory of Center of Mass and Zero Moment point by using the MPC. The smooth trajectory of CoM is generated and the resulted ZMP follows the reference with good accuracy.


Introduction
A trajectory generator is a control system that computes the reference trajectory for the robot's joint [1]. In order to generate a stable walking trajectory for the bipedal robot, many scholars have proposed different methods such as inverted pendulum control [2], the cart-table model [3], the identification method and other , also in our previous works [4] and [5] was interduce the review of the methods and approaches for planning trajectory biped walking biped.
In this paper, we address the problem of simultaneous planning of desired trajectory of center of mass (CoM) and zero moment point (ZMP) [6], a problem that has been of interest in the humanoid robotics community for several years [7]. In this paper, we will use MPC control method to keep balance for a cart-table model. The development of modern control concepts can be traced back to the work of Kalman in the early 1960s with the linear quadratic regulator (LQR) [8] which designed to minimize an unconstrained quadratic objective function of states and inputs [9]. In this paper will present the practical application of trajectory generation controller aspect of bipedal robot including basic of biped robot motion, element of a walking controller, and trajectory planning for walking motion of biped robot.
The bipedal robot controlling is very interested because the changing problems in robotics epically the robots which have a multiple degree of freedom, because it has a free-floating base so it's very difficult control problem, cannot put any trajectory because most likely the robot is going to fall down, for that we have a very important concepts in Bipedal robot one of them is the Center of Mass (CoM) where we can concentrate all the mass of the system and another is Zero Moment Point (ZMP) in some faces as the Center of pressure ( CoP) [10] that point in the foot of biped robot where all the moments balance and all forces is equal to zero so the pressure happening there as shown in Figure 1. For solving the problem of controlling motion of Bipedal robot is use simpler models like linear inverted pendulum (LIPM), With some approximation, we assume that the biped robot walks with constant height and the angular momentum around the CoM is very small, So we can approximate the whole robot as a CoM and CoP, then the biped robot can be seen as an inverted pendulum (LIMP)with constant height (see Figure 2).

The equation of LIMP is [11]
(1) Where , is the acceleration of center of mass on X,Y axis, g-is the gravity, -is the height of CoM and it's constant, , -is the location of Мiжвiдомчий науково-технiчний збiрник «Адаптивнi системи автоматичного управлiння» № 2 (35) 2019 ZMP relative the CoM. According to (1) and (2) the equations is linear, so it's easy to apply the linear control theory for this complicated problem and generate the physically consistent trajectories, this means, generate the CoM trajectory and ZMP/COP trajectories, that is consistent, in other words if we put this onto the robot control system, the robot is not going to tilt or fall down.

Structure of Biped Walking Controller
Controlling the walking motion of Bipedal robot need to solve different issues to keep the robot walks with dynamic stability, for that the controlling system structure (see Figure 3) includes the different elements, Like a Step Planner -because we can't directly move the center of pressure of ZMP to where biped robot should to go, So we need to set certain footsteps parameters like length, timing, height, etc. which gives information about the feet to know raise up and move to another to put down then pick up the other foot, that mean to give the positions of feet, But not where you actuate the robot so we need to get into the Motion Generator, which include the generation trajectory motion for CoM and ZMP and uses the Inverse Kinematics for translation the desired foot position to the position of joints. Finally, we need to control the motion which keep the robot stabilized using sensors, IMU [12], force-torque, etc. Joint controller gets the joint angles where biped robot needs it to be to do the movement.
After defining the step parameters. we are going to generate the trajectories of ZMP and CoM, for that we implement the Model Predictive control (MPC), Note that the MPC controller in this paper is used for generation motion and not for controlling the Biped robot.

Motion Generator
Generate ZMP, CoM Motion Perform Inverse Kinematics Control Stabilization using Sensors: IMU, Force-torque , etc.

Joint motion
Joint angles/torques Figure 3. Structure of walking control system of biped robot

Generation physically consistent trajectories of ZMP and CoM
Using the equations (1) and (2) we can rewrite it's to have the ZMP position as output in X and Y axis: Equations (3) and (4) show that given a trajectory of CoM, ZMP trajectory can be calculated. On the other hand, given a ZMP trajectory, it is also possible to determine the CoM trajectory of the biped robot. To ensure that the resultant CoM trajectory tracks the desired ZMP trajectory. Note this paper deal only with the motion on X axis.
Using equations (3) and (4) and formulate it as a state-space system, for that we define following parameters: gravity , Center of mass height (constant) like a full-size human [13] , and is the simple time. Now we can use the powerful approach of Kajita [14] to design a pattern generator, this approach use the equations (3) and (4) and add an extra state (5) in this case the CoM acceleration allow us to have a problem where ZMP as an output which give us a ability to tracking the ZMP, that mean we can impose a ZMP reference and we can The equations of dynamic system as following: is the jerk of x, and the output is the position of ZMP in x direction, define , , . And we have (9) (10) Now we can formulate it this generation problem as an optimal control problem, by discretizing the system, the state equation could be written as: (11) (12)

Implementation and Simulation Walking Generation with MPC
For simulation and implementing proposed method we use the MATLAB/Simulink. At first, we need to define the LIMP parameters as following: Then we create a state space representation for one axis from (5) and (6)  From (11) and (12) we discretize the system and assign measured/unmeasured outputs using the c2d function as following: AKA_lip_x_d = c2d(AKA_lip_x,Ts); AKA_lip_y_d = c2d(AKA_lip_y,Ts); We also need to specify the measured outputs. This is very important for the MPC formulation. In this case, we just want to track the reference ZMP:

ZMP reference Preview Reference
Also, we need to tune a parameter of MPC, and active the preview reference. Then we export the MPC design to Simulink block (see Figure 4). we generated as the input for control system. Figure 5 shows the result of walking pattern generation with the previewing period in XY axis. We can see a smooth trajectory of CoM (black line) is generated and the resulted ZMP (Red line) follows the reference (green box) with good accuracy.
The generated walking pattern corresponds to the walking of different steps forward.
The ZMP reference is designed to stay in the center of support foot during single support phase, and to move from an old support foot to a new support foot during double support phase. Figure 6 is the resulted ZMP trajectory that following the ZMP reference in X axis.

Conclusions
We have presented a novel method for generating Motion of biped robot based on MPC. Motion generation that is guaranteed to produce stable CoM trajectories. This has been obtained by using a dynamic extension of the LIPM as motion model, the intrinsically stable MPC framework has been developed into a proper gait generation scheme by including automatic footstep generation. Simulations results on the LIPM and AKA biped robot model have shown that the proposed method is quite effective and performs robustly in the presence of changes in the prediction horizon.

Future work
Future work will address several points, such as: Swing foot trajectory, knee flexion and body pitch controllers to directly control the stance knee pitch and the body pitch, respectively. These controllers are crucial when transitioning between steps to maintain a cyclic pattern. Neglecting the body pitch and knee flexion controllers.