Fuzzy logic controller for stabilization of biped robot gait

The article centers round the problem of stabilization of biped robot gait through smoothing out the jumps of first and second order derivatives of a biped robot control vector using the fuzzy logic approach. The structure of a composite Takagi-Sugeno fuzzy logic controller developed by the authors is presented. The simulation study of a robot gait with climbing an obstacle is carried out and the results provided in the article showed that the developed controller performed significantly better than the analytical formula model in terms of smoothing out the derivatives of the control vector.


Introduction and statement of the problem
The smoothness of the curves of the control vector of the robot legs, as well as their derivatives is important for stabilization of a robot gait.Using the Simscape Multibody Contact Forces package, we previously developed a Simulink model of the leg of a bipedal walking robot [1,2].The structure of the leg is shown in Figure 1. ( , ) a a .Earlier, we created a MATLAB-function that performs the assignment of angles for the coordinates (x, z), using the geometric relationships between the elements of the foot.
The use of formula calculation for vector values ( , ) a a led to jumps and discontinuities in the graphs of the first and second derivatives of the control vector, which negatively affected the stability of the gait.To stabilize leg control, it was decided to create a Takagi-Sugeno (TS) fuzzy logic controller.

Solution
The structure of the fuzzy controller we`ve created is shown in Figure 2: the composite controller consists of two TS-controllers performing separate tasks for 1 a and 2 a .A triple of values consisting of the current value of the linear Ramp signal, the previous value of 1 a and the previous value of 2 a are given to the input of both TS controllers.The training of the TS-controllers was carried out using the ANFIS method on a data sample generated using the previously developed formula model for one step of the robot's leg.The sample contained 2910 values of the input triple.The ANFIS method was chosen due to the success of the neuro-fuzzy approach in the tasks of mobile robotics [3][4][5][6].For each TS-controller, the three generalized bellshaped membership functions were selected.The learning error was of the order of 5 10  after 3 epochs of training.

Results and discussion
Figure 3 compares the graphs of the first time derivative for the angle 1 a (left) and for the angle 2 a (right) for one step of the robot, obtained using the original formula model and using a fuzzy model.To smooth out the jumps of the second derivatives, we envisaged the use of a filter (Figure 4).However, even with this filter, a smoother control over the second derivatives is noticeable when using a fuzzy controller (Figure 5)  As can be seen in the graphs presented in Figure 3 and Fig. 5, the use of the fuzzy logic controller has made it possible to substantially smooth the oscillations of the control signal, which is especially noticeable in the graphs of the second derivatives.This effect should have a significant positive impact on improving gait stability, as well as reliability of the electronic mechanical components of the robot legs.
Based on the one-step fuzzy data, we modeled a 10step walk of the robot with climbing an obstacle -a stair 10 cm high (Figure 6).As can be seen from the results of the simulation, the data obtained with the fuzzy logic controller has made it possible to carry out the robot walk with climbing the obstacle without bursts and discontinuities in the graphs of the first and second derivatives of the control vector.

Conclusion
We have created a composite Takagi-Sugeno fuzzy logic controller to stabilize the gait of the biped robot.Training of the controller was carried out using the ANFIS method.
In the simulation and comparative analysis of the control with the analytical formula model and with the help of the developed fuzzy controller, we discovered a much smoother control over the first and second derivatives using the fuzzy controller.The significant advantage of the fuzzy controller is also preserved when the filter is used to smooth out the jumps of the second derivatives for the formula model.
Further researches will be directed on improvement of the fuzzy controller, new samples of training data and genetic algorithms for automation of training of the controller will be applied.

Fig. 2 .
Fig. 2. The structure of the robot leg fuzzy controller.

1 a 2 aFig. 3 .
Fig. 3.The first derivatives of angles, obtained with the formula model (blue) and with the fuzzy inference (violet).

Figure 4 .
Figure 4. Structure of the filter used to smooth out the jumps of the second derivatives of the control vector.

1 a 2 aFig. 5 .
Fig. 5.The comparison of the filtered formula (blue) and filtered fuzzy (brown) second derivative for the angles.

Fig. 6 .
Fig. 6.The robot climbed the stair.The results of the simulation is shown in Figures 7-10. .

Fig. 10. 2 a
Fig. 10. 2 a during 10 step walk.As can be seen from the results of the simulation, the data obtained with the fuzzy logic controller has made it possible to carry out the robot walk with climbing the obstacle without bursts and discontinuities in the graphs of the first and second derivatives of the control vector.
The work was carried out within the framework of the state task of the Ministry of Education and Science, project No. 8.2321.2017"Development and adaptation of control systems for compensation of dynamic deflecting effects on mobile objects in a state of dynamic equilibrium".