An Adaptive Trajectory Tracking Controller of a Multi-joint Snake Robot Considering Non-holonomic Constraints

: Multi-joint snake robot is a vital reconnaissance, surveillance and attack weapon in national defence and military in the future. To study the trajectory tracking problem of a multi-joint snake robot with high-redundancy and multi-degree of freedom in the plane, an adaptive trajectory tracking controller of a multi-joint snake robot considering non-holonomic constraints is proposed in this paper. The adaptive trajectory tracking controller replaces unknown parameters in the environment with estimated values, which effectively solves the negative effects caused by uncertain and time-varying environmental parameters in the process of the robot movement and realizes the stability of the controller. Firstly, a new dynamical model of a multi-joint snake robot is established through coordinate transformation. Secondly, the control objective of the controller of the multi-joint snake robot is established. Thirdly, the proposed controller of the multi-joint snake robot is designed by the Backstepping method to realize the control of the joint angle tracking error, link angle tracking error, actuator torque error and motion speed error of the robot. Then, a suitable Lyapunov function is found to verify the stability of the controller. Finally, through the MATLAB simulation and prototype experiment, the motion process of the multi-joint snake robot is observed, the trajectory tracking performance of the robot is analyzed, and the effectiveness of the adaptive trajectory tracking controller is verified.


Introduction
The multi-joint snake robot is a robot designed by imitating the structural characteristics and motion mechanism of biological snakes. The robot has advantages of small size, high flexibility and various forms of motion, and it can move in a narrow and unstructured terrain environment [1,2]. The slender multi-joint snake robot can hide in grass and rock seams, which significantly improves the application of the multi-joint snake robot in the military and national defence fields. Besides, the multi-joint snake robot has a super high degree of redundancy and freedom, which can make the motions of the robot stable in case of joint failures [3,4]. These characteristics of the multi-joint snake robot enable it to perform reconnaissance and exploration tasks in various complex environments. In the future battlefield, the multi-joint snake robot will play an irreplaceable role.
At present, researchers mainly focus on two aspects of the gait research of the multi-joint snake robots, which are the two-dimensional gait of the winding motion and the three-dimensional gait of the spiral movement. The two-dimensional gait of a multi-joint snake robot is the focus of researchers' attention [5]. The motion law of the snake robot is basically contained in the two-dimensional plane. Meanwhile, the research on the two-dimensional gait of the winding motion of the robot can lay a solid theoretical foundation for the research on the three-dimensional gait of the spiral movement of the robot.
Reference [6] has studied the movement of a biological snake on land. He first proposed the Serpenoid curve of the two-dimensional gait of a multi-joint snake robot with winding motion and established a serial modular rotation link model. The curvature of the Serpenoid curve is a sine function of the arc length. Because the link model is connected in series, the structure of the snake body is complex, and the calculation speed of the system is slow. Once any joint module of the robot breaks down, the whole snake body cannot achieve the expected movement. Reference [7] has established the kinematics model and dynamic model based on the winding gait of the Four-link snake robot. However, this Four-link model has a simple structure and is severely restricted by the geographical environment.
Reference [8] has studied the mechanism of a biological snake movement. They believe that the robot can realize forward motion when the tangential friction coefficient of a multi-joint snake robot is greater than the normal friction coefficient. This research dramatically promotes the development of motion control of a multi-joint snake robot. However, this does not explain how the robot moves sideways. Reference [9] has designed the constraint function of a multi-joint snake robot based on the head rotation angle and forward speed, which realized the path tracking control of the robot.
Nevertheless, this method has not been verified in the robot prototype experiment. Reference [10] has designed a virtual complete constraint function based on the linear feedback control law of a multi-joint snake robot, which realized the convergence of the robot path tracking. Nevertheless, the robot they studied is applied in the condition of complete constraints, and the influence of Non-holonomic constraints is not considered. Reference [11,12] has proposed the Serpentine curve to control the motion of a snake robot. It is proved that the Serpentine curve has a higher motion effect than the Serpenoid curve from the perspective of motion efficiency, which makes a contribution to the three-dimensional kinematics modelling of the robots. Reference [13,14] has solved the problem of the fluid-structure coupling obstacle avoidance of a snake robot with the IB-LBM method. This method can realize the trajectory tracking of the robot in underwater obstacle avoidance, but the stability of the trajectory tracking of the robot is not verified theoretically. Reference [15] has defined two helix direction angles from the perspective of geometric. He established the kinematics model of the three-dimensional helix side-shift of a multi-joint snake robot and carried out the simulation experiment on the model through the computer. Reference [16] has analyzed the motion characteristics of a spiral side-shift of the multi-joint snake robot and improved the spiral curve motion function of the robot to elliptical spiral curve motion function. After that, reference [17,18] has proposed a three-dimensional conical spiral side-shift curve of the multi-joint snake robot. However, the robot needs control from the outside during its movement. Based on the Frenet-Serret equation, reference [19] has established a three-dimensional link model of the arc-structure of a multi-joint snake robot and realized the smooth movement of the multi-joint snake robot in space.
To reduce the restriction of non-holonomic constraints on the multi-joint snake robot and improve the adaptive ability of the multi-joint snake robot to unknown environment friction coefficient in trajectory tracking, an adaptive trajectory tracking controller for the multi-joint snake robot considering non-holonomic constraints is designed [20][21][22]. Firstly, we optimize the dynamical model of the multi-joint snake robot with non-holonomic constraints by coordinate transformation, and the new dynamical model of the robot is obtained. The new dynamical model of the multi-joint snake robot can make the motion path converge to the desired trajectory [23]. Secondly, we develop the control objectives of the adaptive trajectory tracking controller of the multi-joint snake robot. Then, to realize the control objectives proposed, the adaptive trajectory tracking controller of the multi-joint snake robot is designed by the Backstepping method to realize the control of the joint angle tracking error, link angle tracking error, actuator torque error and motion speed error of the robot. Finally, a suitable Lyapunov function is found to verify the asymptotic stability of the controller. This method improves the deficiency of the reference [13,14], which does not verify the stability of the robot trajectory tracking theoretically. To verify the effectiveness of an adaptive trajectory tracking controller of a multi-joint snake robot, experiments are carried out. First of all, this paper uses MATLAB to simulate the movement control of the robot. By observing the movement mode of the robot, the movement track of the robot is studied, and the effectiveness of the controller is verified. Then, the experiments of the multi-joint snake robot are carried out. The control instructions are input to the joints of the robot in turn through the Bluetooth module. The motion position and speed of the robot are transformed into the state-feedback of the multi-block. By analyzing the motion form and path of the multi-joint snake robot, the validity of the adaptive trajectory tracking controller of a multi-joint snake robot considering non-holonomic constraints is verified.
The contributions and innovations of this paper are as follows: 1. The adaptive trajectory tracking controller proposed in this paper fully considers the influence of non-holonomic constraints on the trajectory tracking of the robot. This controller makes up for the lack of research in [9], verifies the trajectory tracking performance not verified in [11,12], and realizes the robot tracking motion in the plane.
2. The non-holonomic constraints only restrict the motion of the multi-joint snake robot, and the geographical situation of the robot is not restricted, which solves the problem that the environment limits the four-link model proposed in [7]. Therefore, under the non-holonomic constraints, the robot can reduce the complexity of the system, improve the computing speed of the system, reduce the computing cost, and make up for the shortcoming of the Serpenoid control curve in [23].
3. The proposed adaptive trajectory tracking controller can effectively solve the negative effects of uncertain and time-varying environmental parameters in the motion of the robot. The controller can estimate the unknown friction coefficients and replace the actual value with the estimated value, to adjust the multi-joint snake robot in real-time and ensure the effectiveness and stability of the whole system.
The rest of this paper is organized as follows: in Section 2, based on the dynamical model of the multi-joint snake robot with non-holonomic constraints, the dynamical model of the robot after coordinate transformation is obtained. In Section 3, The control objectives for the joint angle, link angle, actuator torque, motion position and speed of the multi-joint snake robot are established. In section 4, we design an adaptive trajectory tracking controller of the multi-joint snake robot by the Backstepping method and find a Lyapunov function, which proves the stability of the controller. In section 5, simulation and prototype experiments of the multi-joint snake robot are carried out to verify the effectiveness of the adaptive trajectory tracking controller. In Section 6, we get the conclusion.

A. Dynamical model
In this part, we set up the dynamical model of a multi-joint snake robot with non-holonomic constraints.
The robot consists of N links and each of the link is 2h in length. There are 1 N − joints between the links. The driving of the joints is controlled by the joint actuator. There are two driven wheels in the middle of each link. In the dynamical model of the multi-joint snake robot, the widths of the joints and links are not considered. The dynamic model of the robot is shown in Figure 1. jN  …， th joint in the multi-joint snake robot is which is the angle of rotation between adjacent links [23,24]. The set of joint angles is centroid is in the center of the joint. The link angles speed of the robot is 1 2 ,, the joint angles speed of the robot is  [25,26].
Refering to the [10,27], the dynamical model (1) of the multi-joint snake robot with non-holonomic constraints is obtained.

B. Coordinate transformation
The snake robot is made up of multiple joints and moves forward by changing the shape of its body, as shown in Figure 2. These motion characteristics of the multi-joint snake robot will lead to the complexity of the adaptive trajectory tracking controller design. To simplify the design of the controller, the dynamical model of the multi-joint snake robot with non-holonomic constraints is optimized by coordinate transformation (2). When the multi-joint snake robot rotates without lateral force, the centroid of the robot will move along the tangent direction for a certain distance  , and the new robot centroid will be 2ˆˆT xy p p p  =  ， [26]. After the coordinate transformation optimization, the new dynamical model of the multi-joint snake robot with non-holonomic constraints is (3), as shown in where, 1

Design Objectives
In this part, we will develop the control objectives of the adaptive trajectory tracking controller of the multi-joint snake robot with non-holonomic constraints [10,26]. The adaptive trajectory tracking controller of the multi-joint snake robot is designed from two parts, which are gait control and direction control, respectively. The gait control is mainly based on the gait mode of the multi-joint snake robot. A feedback input-output controller is designed, and the control input vector function of the robot is derived, which enables the robot to realize the forward movement of winding gait. Direction control is mainly controlling the multi-joint snake robot that can move forward along the desired path.
Objective 1. Gait control: An input-output feedback controller is designed to make the tracking error of the gait control of the multi-joint snake robot stable.  When the gait control and direction control of the robot are designed, we need to design objectives 1 to 5 successively. Simultaneously, an appropriate Lyapunov function needs to be found to prove the stability of the system. When objective 1 is realized, the multi-joint snake robot can achieve forward motion in a winding gait. When objective 2 is realized, the link angle of the robot converges to the desired value, making the robot move toward the specified path direction. When objective 3 is realized, the joint angle converges to the desired value, so that the swinging amplitude of the robot joints can be realized in the form of winding. When objective 4 is realized, the actuator torque converges to the desired value, so that the joints of the robot can maintain a stable rotation speed. When objective 5 is realized, the robot will move forward along the desired path. Meanwhile, the motion speed of the robot follows the desired value, that is, the position error and the motion speed error converge to zero.

Adaptive Controller Design
In this part, we mainly design the adaptive trajectory tracking controller for the robot, aiming to realize the gait control and direction control of the robot. Now we realize each of the five control objectives in the third section.

A. Gait control
The forward motion of the multi-joint snake robot is realized by controlling the swing amplitude and frequency of each joint [6]. The motion function of the   1, , 1 jN − th joint of the robot is (4).
where, The link angle error of the multi-joint snake robot is designed as (5).
where, there are Differential the link angle error (5) of the robot to get (6) and (7).
A new input-output feedback controller is designed as (8).
Eq. (7) and (8) The joint rotation torque u of the robot is set as the control input vector of the system.
Eq. (11) and (9) are combined, and the joint dynamic equation (12) of the robot is obtained.
To verify the stability of the robot dynamics equation, Eq. (13) is designed.
The state-space of the dynamic equation (14) is obtained. 2 1 The stability of the state space is determined by the Lyapunov first criterion.
The poles of the state space are all located in the left half-plane. The system is stable.

B. Joint angle control
To make the multi-joint snake robot move in the direction of the specified path, a desired joint angle The joint angle error of the multi-joint snake robot is differentiated to obtain (17).

C. Link angle control
To make the joints of the multi-joint snake robot be able to winding and swing, we set the desired link angle  of the robot to make the link angle error e   =− stable. In order to guide the multi-joint snake robot to the desired path, we introduce Line-of-Sight (LOS) method, with the aim to make the link angle  of the robot track its desired value  and realize the task of robot orientation tracking [10,28]. Referring to the desired link angle = arctan t p  −  of the robot, where the parameter  is the forward distance,  determines the speed of the multi-joint snake robot to converge to the desired path. Moreover, 0  represents the direction forward and 0  represents the direction backwards. Since  directly affects the iteration speed of the robot's motion direction angle, the desired path of the robot can be achieved by adjusting the value of  [26].
where, the tangent speed of the robot is The differential of the link angle error of the multi-joint snake robot is obtained (21).
The link angle speed error of the robot is set as (22).
The differential of the link angle speed error of the multi-joint snake robot is obtained (23).
The auxiliary function is set to (24).
Set the Lyapunov candidate function as 2 L .

D. Actuator torque vector control
To maintain the stable rotation speed of the joints of the multi-joint snake robot, we set the desired We calculate the actuator torque vector error by differential calculation and combine the result with (8) and (33) to obtain (34).

E. Motion position and speed control
In order to control the motion position and speed of the multi-joint snake robot on the desired path, we Combining the Lyapunov candidate function set above, V can be obtained.
0 V< is clearly a negative definite. And the system is stable.
According to the set forward distance  and the initial state of the snake robot, the desired direction angle of the robot can be calculated by using the LOS method. After the desired motion direction angle is input into the head controller of the robot, the offset compensation of joint angle is obtained.The joint angle offset compensation is used as the virtual control input to output the desired joint angle of the robot through the gait controller.The angle controller combines the estimated time-varying gain with the desired joint angle to calculate the desired joint angle speed. By using equation (33), the estimated values of friction coefficients, motion position variable, auxiliary function of the desired link angle and desired joint angle speed can be converted into the torque control input of the joint, and then the motion and trajectory tracking of the multi-joint snake robot can be controlled. The state variables of the multi-joint snake robot are collected by sensors. In the feedback segment, the actual position and direction angle of the multi-joint snake robot are fed back to the LOS equation and the head controller.
The actual joint angle is fed back to the gait controller. The joint angle speed is fed back to the link angle controller. The actual motion speed and angle speed are converted into the estimated value of the environmental friction coefficients through the adaptive segment, and the estimated values are used to replace the unknown environmental friction coefficients in the multi-joint snake robot model. The complete structure of the adaptive trajectory tracking controller is shown in Figure 4.

Simulations and Experiments
In this section, we will carry out simulation experiments and prototype experiments to verify the effectiveness of the adaptive trajectory tracking controller of the multi-joint snake robot considering non-holonomic constraints.

A. Simulations
A dynamic model of a multi-joint snake robot with non-holonomic constraints is established by MATLAB. According to the shape of the multi-joint snake robot, the number of joints of the robot is   The joint angle error curve of the multi-joint snake robot is shown in Figure 8. As can be seen from  The motion speed error curve of the multi-joint snake robot is shown in Figure 9. As can be seen from   Table 1. The motion speed 39s 44s

B. Experiments
In this part, we carry out a prototype experiment on the multi-joint snake robot with non-holonomic constraints, to verify the stability of the adaptive trajectory tracking controller, as shown in Figure 10.
For the convenience of design, the multi-joint snake robot adopts 6 N= joints, the length of which is 211 h mm = and the radius of which is Six groups of driven wheels are evenly distributed in each joint, and the maximum rotation angle between joints is = 3    . The robot is 3D printed and moves forward by the friction of its own motion on the ground. The modular structure is adopted between the joints of the robot, in which the main control module is responsible for controlling the movement of the robot. The Bluetooth wireless transceiver module is responsible for receiving the instructions from the upper computer and feeding back the current status of the robot. The joint module is responsible for completing the instructions from the upper computer. The ranging module is responsible for detecting the distance of obstacles around the robot. The power module is responsible for providing energy for the robot. Simultaneously, the multi-joint snake robot control system uses the bus to realize the mutual communication between the modules. Fig. 10 The prototype of the multi-joint snake robot Put the multi-joint snake robot on the floor of the corridor, observe the movement of the robot, and judge the progress of the robot by observing the relative position of the ground and the multi-joint snake robot. The robot can realize forward motion, as shown in Figure 11. To analyze the performance of the multi-joint snake robot in motion, we extract the performance indexes of the first joint and the sixth joint in the straight path of the robot. The multi-joint snake robot moves forward under the control of the adaptive trajectory tracking controller. The robot will adjust the relationship between its actual position and the ideal position during the movement of the robot before 100cm. When the robot moves to 100cm, the actual position of the robot tracks the desired position almost perfectly, as shown in Figure 12. Meanwhile, the robot will adjust the relationship between the actual link angle and the desired link angle during the movement of the robot before 150cm. When the robot moves to 150cm, the actual link angle of the robot tracks the desired link angle almost perfectly, as shown in Figure 13. It can be seen from Figure 12 and Figure 13 that the multi-joint snake robot will have a small amplitude of oscillation in the initial period of movement, which is the self-adjustment process of the robot. Meanwhile, the motion position and link angle of the robot lag slightly compared with the ideal value, because the movement process of the robot will be affected by environmental

Conclusion
In this paper, an adaptive trajectory tracking controller of a multi-joint snake robot considering non-holonomic constraints is proposed. This controller can effectively solve the negative effects of the uncertain and time-varying environment parameters during the robot movement. When the robot moves in the environment with different friction coefficients, the unknown parameters are estimated, and the estimated values are used to replace the unknown parameters. This ensures that the adaptive trajectory tracking controller can enable the robot to achieve stable trajectory tracking motion in the plane. To verify the stability of the adaptive trajectory tracking controller, a Lyapunov function suitable for stable gait and stable direction of the multi-joint snake robot is found by the Backstepping method, which verified the stability of the controller. To verify the effectiveness of the controller, we carry out simulation experiments and prototype experiments. By analyzing the motion form and trajectory of the robot, the effectiveness of the adaptive trajectory tracking controller of a multi-joint snake robot considering non-holonomic constraints is verified.

Availability of data and materials
The datasets supporting the conclusions of this articleare included within the article and its additional files.

Competing interests
The authors declare that they have no competing interests.