PI/backstepping control of snake robot optimazed by Genetic Algorithm

This paper describes the design of robust control of PI/Backstepping for the snake robot to control the joints motion. First, the stability of the method is proved and, by applying this controller to the robot, its motion pattern is controlled in a way that it can move and follow by mimicking the motion of real snakes on the predefined trajectories. Then, the control parameters is optimized using the Genetic Algorithm (GA). Comparing obtained results with sliding mode revealed that, the former has significantly reduced the tracking error and control energy; in addition there is no chattering phenomenon.


INTRODUCTION
It is known that a snake can move in various environments and quickly adjust its motion mechanisms to different environments. This motion pattern inspired the researchers to develop a robot imitating snakes' motion. The snake robots are considered among the most robust robots [1] since their potential energy remains low in most situations. The snake robots have a mechanism with high degree of freedom (DOF), which in turn impedes their control. However, on the other hand, it enhances their flexibility, maneuvering power, as well as robot skill level and facilitates its movement on uneven surfaces [2]. The first study on snake's motion was conducted on 1940 by Gray [3]. Hirose developed the first snake robot in 1971 [3]. He published his research of snake robot in a book, where he proposed some procedures to dynamic, control solution and trajectory design and showed snakes' body as a serpenoid curve as it moves. The robots developed by Hirose had inactive wheels which like the real snake, minimizes and maximizes the friction in the longitudinal and lateral directions, respectively [4,5]. Over the past two decades, the works conducted on the snake robots have indicated a considerable development [3]. Ostrowski and Burdick [6] focusing on snake motion in a geometrical mechanic perspective solved the problem mainly based on the geometrical, rather than mechanical, approach. Newton-Euler method was applied in 2D dynamic modeling of the snake robot as well as friction properties of the heterogeneous ground [7]. Ground friction model involves the statics and dynamics of the coulomb ground fraction [3]. In another work, snake robot 3D dynamics was studied on a smooth surface [8,9]. Ma et al [10] formulized the robot dynamics as the slip in vertical direction using the Newton-Euler method to analyze the creep movement. Besides, they investigated the effects of snake motion parameters on the velocity of robots motion in a slope. The concept of passive motion in the snake robots has been utilized to follow the serpenoid curve with efficient power utilization [11,12]. Vossoughi et al [12,13] applied an elastic actuator between two successive members of the snake robot and obtained initial conditions to create passive motion in the robot. He applied the methods proposed by Kane and Gibbs-Appell to formulize the governing dynamic equations of robot motion. The proposed dynamic models indicated that this method is more efficient to Lagrange method.
The control methods applied in controlling the snake robots are mainly divided into two groups: trajectory tracking control and online gait generation control [14]. These control methods highly depends on the dynamic and kinematic modeling of the robot [15,16]. Transeth et al designed the linearizing inputoutput controller for snake robot which makes the robot joints asymptotically stable towards the designed reference trajectory [17]. As a preliminary step in reinforcing snake robots to move in the crowd environments, the researchers [18] proposed a control strategy which integrates environment's match with directional control to trace the trajectory of the smooth line in the environments with obstacle. In addition, it has been shown that the snake robot mechanics with tactility sense enables the robot to feel the environments.
Although the proposed methods indicated the efficient performance in the ideal conditions, these control laws are sensitive to uncertainty of the non-modeled parameters and dynamics constantly present in the snake robot model. The proposed control method [19] for snake robot control is robust to the parameters uncertainty; however, the chattering phenomenon is unavoidable in the control input.
To deal with all these problems, PI/Backstepping controller is studied in the present work to control the angles of snake robot joints. This method involves lower levels of control energy and tracking error as well as no chattering phenomena, as compared to the method proposed in another work [19]. Next, the snake robot system is explained. In section 3, PI/Backstepping and the designed controller stability is studied. Section 4 is allocated to the simulation and the results obtained from testing the controller on the simulated system. In the last section, the overall conclusion is presented.

II. SNAKE ROBOT MODEL
The snake robot is considered as a robot composed of interconnected links, to dynamically analyze, where each link has the length and mass of and m, respectively ( Fig. 1). Such a robot has degree of freedom [20]. In addition, a wheel is installed in the middle of each link. Moreover, is the coordination of centroid of the link with respect to the reference coordinate system; is the absolute angle of the link measured with respect to the axis and in the geometrical direction; and is the relative angle between two successive angles which is expressed as: These angles are controlled by the input τ momentums.

A. Kinematics
The method is used for modeling the snake robot is the Kane method. This modeling method is based on the velocity definition [19] and since the snake robot has DOF of , it only requires independent velocities, which are defined as follows: Where, V i t and V i n are the linear velocities of the centroid of the link in the tangential and perpendicular directions, respectively; and θ i is the angular velocity of the link with respect to local coordinate system attached to the link [19].
The linear velocity in the tangential and perpendicular directions as well as the angular velocity for each link is obtained as follows: Differentiating (3) gives the linear and angular accelerations of the link as follows:

B. Dinamics
As the snake robot is in contact with the environment, the robot equations are to be extracted using the motion equation as well as considering the forces and moments inserted on the links.
The inertia forces inserted on the links can be expressed as: Where, is the moment of inertia for link and is the DOF of the robot.
The activity forces inserted on the links are expressed as: Where, , , and are the kinetic moments and friction moment of link, respectively; and and are tangential and perpendicular components of friction, respectively. For further information about the details of deriving the dynamic and kinematic equations for snake robot see [19].
Finally, by summing (5) and (6), the equations of motion of the snake robot are obtained [19]. Then: The assigned controller for robot control is PI/Backstepping. Thus, the robot motion equation is converted to a strict-feedback form: Where, is determined symmetric and positive matrix and involves inertia, centrifugal force, and friction. III. DESIGNING THE PI/BACKSTEPPING CONTROL One of the nonlinear control methods using Lyapunov functions, which is introduced in the state space is Backstepping technique. This method is a technique in which there is no obligation to eliminate nonlinear factors in the control law. In that case if a nonlinear factor serves as a stabilizer, it may be useful in control perspective as it strengthens the system against the modeled errors and requires less control effort in stabilization of the looped-circuit control system.
The control law of the PI/Backstepping method is derived through integrating the Backstepping method with a PI structure. The stability of the proposed method proved using the Lyapunov function for the comprehensive nonlinear system is presented in the following. Then, the control law is determined for an n-link snake robot.

A. Stability analysis
Theorem 1: The system equations are assumed as follows: Where, , , and , in which could be greater than one. Also, , , , and are the known and smooth functions and and are zero in the origin and is a nonsingular matrix. Moreover, it is assumed that it is possible to stabilize (9) with = β( ) and Lyapunov function ( ) satisfies the following condition: Now, it is assumed that the following Lyapunov function is the subset of Lyapunov function of the overall system: Where, > 0.
Selecting the control input as follows, the system is asymptotically stable in the origin: Where, > 0 and > 0 are the control parameters.

Proof: Differentiating the Lyapunov function gives:
Then, by substituting (10) in (14) we have: Finally, applying the following condition, the system is asymptotically stable in the origin: The advantage of this method to the Backstepping method is its significant decrease in the control cost. An increase in b certainly limits the main error to zero. Besides, once k rises, the error limitation to zero continues with higher rate.

B. The controller design snake robot
To create the snake motion, the relative angles between the successive joints vary sinuously as follows: Where, α is the sinusoidal amplitude; γ is the bias angle; and β is the phase difference between two successive joints.
The PI/Backstepping method tracks the robot trajectory through controlling the joints motions. Therefore, the output parameters are the relative angles between joints of the robot and are defined as: Nonlinear equations of the robot in term of are derived as: Here, can be written in term of as follows: Where, is expressed as: Using (8) and (19), we have: Where: The functions and do not have certainty. Therefore, by applying the boundaries, this uncertainty can be applied as: Where, is the unique matrix ( × ); and and are the estimates of and .
parameter tracking error is defined as: The desired trajectory for the robot is a sinuous path: The required equation = is chosen as: Finally, the PI/Backstepping controller for the snake robot is obtained as:

C. Parametric optimization using the GA
There are many control parameters in PI/Backstepping method, which can be arbitrarily adjusted. The optimum arbitrary selection of these parameters is almost impossible. These parameters can be optimized using the GA. To do so, the cost function is considered as follows: is kinetic moment and is output of link. In this paper we have 2 constants ( and ) that designed with GA.

IV. SIMULATION
In this part, simulation results are presented for a 4-link snake robot. Almost in all forms, the results obtained by applying the controllers are compared with the sliding mode.
The nominal values and range of parametric changes of the system are considered as: The desired trajectory traced by the joints is considered as: Where, α = π/12, β = π/3, γ = 0, and ω = 2π rad/s.
The required initial conditions are as: The optimized parameters ( and ) are obtained by GA as follows: Fig. 2 indicates that the snake robot designed by the controller can trace the designed ideal trajectory. Fig. 3 to 5 present the control inputs through both methods.
The value of cost function per R values is compared in TABLE I. As table shows, the value of this function for the proposed method is less as compared to the sliding mode.  Fig. 6 to 8 indicate the relative angles of the joints and desired relative angles using the proposed controller. As shown in these figures, tracking process was appropriately carried out and the relative angels could follow the sinuous desired trajectories. Fig. 9 indicates the relative joint angles and the desired sinuous trajectories using the controllers of sliding mode and those of the proposed method. It is clear that the error of the proposed controller is obviously less than that of the sliding mode.      In this paper, the PI/Backstepping robust control was proposed for the snake robot to control the joints direction. The control law was obtained through integrating the Backstepping method with a PI structure. Then, using an appropriate Lyapunov function, its stability was substantiated. Next, the angles between the successive joints were controlled using the proposed controllers and trajectory tracking of the desired path was suitably conducted. The performed simulation for a 4-link snake robot indicated that the designed controller involves less tracking error and cost function as compared to the sliding mode with no chartering phenomena. As the next step, one can study the Backstepping method using the inverse optimal approach.