Hierarchical sliding mode attitude control of a spherical underwater exploring robot

Abstract. Aiming at the attitude control of the spherical underwater robot, the kinematics and dynamics of the underactuated attitude control adjusting system are analyzed, and its dynamics model is established. By using the differential homeomorphism transformation, the model was divided into two subsystems. Based on the advantages of sliding mode variable structure control, this paper adopts the hierarchical sliding mode variable structure method to design the sliding mode of different variables respectively, and then designs the sliding mode of the whole system. The presented control scheme can solve the coupling problem well. The controller has small overshoot and can well suppress chattering phenomenon. The simulation results show that the designed control law can make the system converge quickly and control the attitude of the underwater spherical robot effectively.


Introduction
As a kind of special robots, spherical underwater robots have the following advantages: good compression performance, uncoupled hydrodynamic calculation, equal hydrodynamic parameters in each direction. Accordingly, spherical underwater vehicles have a broad prospect of application in underwater archaeological explorations, sea-floor geomorphic observation, aquaculture, and so on [1][2][3].
Underactuated system has many advantages in practical application. Due to the reduction of the actuators, the weight, cost and volume of the whole control system will be reduced. In a word, the research on the control method of underactuated system has important theoretical and application value [4]. For underactuated vehicles, there were fewer independent motion control actuators than degrees of freedom (DOF) [5]. It has been proven that the underactuated mechanical systems have second-order nonholonomic constraints [6]. The attitude adjusting problem for underactuated underwater vehicles is of great challenge. The famous Brockett's necessary condition shows that asymptotic stabilization of these underactuated UUVs cannot be achieved with any smooth or continuous time-invariant feedback controllers [7][8][9]. The underactuated control laws can be used to handle actuator failure for fully-actuated underwater vehicles or over-actuated underwater vehicles [10]. Nowadays, the attitude adjusting problem of underwater vehicles and other rigid underactuated mechanical systems has made some achievements. Throughout the existing research results, the design methods of attitude adjusting controllers include backstepping method [11] and Lyapunov's direct method [12], sliding mode control [13], adaptive control [14], saturated-state feedback control and model predictive control control [15]. Among these methods, the sliding mode control (SMC) is one of the most effective means to handle the problem of motion control for underactuated underwater vehicles with external disturbance and model uncertainties, because it is natural strong robustness with regard to internal and external disturbance. Moreover, SMC has also the advantages of reduced order, decoupling, fast response, good dynamic characteristics and so on. Therefore, SMC can solve the attitude adjusting problem for underactuated underwater vehicles well.
The traditional SMC is an effective method for dealing with bounded uncertainty/disturbances and parasitic dynamics of nonlinear system. In this paper, a hierarchical sliding mode control method is proposed. The sliding planes of each layer of the method are asymptotically stable, which can drive the underactuated underwater robot to the desired state. Because the sliding mode control has the function of anti-interference, the designed controller in this paper has strong adaptability to all kinds of external disturbances.

Physical prototype of BYSQ-2
BYSQ-2 underwater spherical robot mainly consists of spherical catheter 1, Sleeve 2, long axis motor 3, weight pendulum 4 and short axis motor 5. Two motors placed perpendicular to each other, which can drive the weight pendulum to rotate to adjust the attitude. Physical prototype of robot is shown in Fig. 1. If the components of the underwater spherical robot BYSQ-2 are all regarded as rigid bodies, then BYSQ-2 is a multirigid body composed of three rigid bodies. The spherical shell, catheter and propeller are fixedly connected with each other, which is rigid bodies with a total mass ; the sleeve is rigid body with a mass ; the two weightpendulums are called rigid body 3 with a mass 3 .

Kinematic analysis of attitude control system
In order to analyze the motion of multi rigid body system of underwater spherical robot, the following four coordinate systems are established {0}, {1}, {2}, {3}, as shown in Fig. 2. The coordinate system {0} is an inertial reference system fixed to the earth, with the axis pointing north and the axis pointing vertically downward; the coordinate system {1} is a dynamic reference system fixed to the rigid body , with the origin at the center of the ball, the axis along the long axis, initially parallel to the coordinate system {0}, and the axis coincides with the axis; the coordinate system {2} is fixed to the rigid body , with the origin at the center of the ball, the axis along the long axis, the coordinate system {3} is fixed to the rigid body and the origin is located at the center of the ball. At the beginning, the coordinate system {3} is parallel to the coordinate system {2} and the axis coincides with the axis . Because the Euler angles of the body coordinate system {1} and the relative inertia coordinate system {0} are respectively , and , let: (1) Then the angular velocity and acceleration of the coordinate system {1} relative to the coordinate system {0} are: ( Because the angular velocity of the rigid body around the axis is , the angular velocity in the axis direction is , and the angular velocity in the axis direction is . Let: ( It can be concluded that the angular velocity and acceleration of the rigid body in the body coordinate system {1} are: The relationship between the angular velocity of the rigid body in relative inertial coordinate system {0} and the body coordinate system {1} is as follows: = + sin tan + cos tan , = cos − sin , = sin cos + cos cos .
Let the rotation angle of coordinate system {2} relative to axis of coordinate system {1} be , The attitude transformation matrix can be obtained as: Let the angular velocity of the rigid body around the axis is , then: And let: Let the rotation angle of coordinate system {3} relative to axis of coordinate system {2} be , the angular velocity of the rigid body around the axis is , then: The attitude transformation matrix can be obtained as:

Dynamic analysis of attitude control system
According to the dynamic model equation of the underwater spherical robot established by Fossen [16], the dynamic equation of the rigid body when the propeller is not working can be obtained as follows: where , , are the moment of inertia of the rigid body around the axis, axis and axis respectively. and are the components of the torque of the short axis motor acting on the rigid body on the axis and axis. , and are the inertial products of rigid body to plane , and , respectively and: = , = , = .
Due to the symmetry of the structure, we have: Since the values of are similar to those of and , it is considered that: So Eq. (11) can be reduced to: where and are the moment of inertia of the sleeve (rigid body ) around the axis and axis respectively. Due to the regular shape of the sleeve, it can be approximately considered that: where is the moment of inertia of the sleeve (rigid body ) about any axis in the plane. And we have: Let: Since: = . (20) We have:

= .
(21) Then the system model Eq. (16) can be rewritten as: In the coordinate system {3}, the torque of short axis motor can be expressed as: Let: Then make the input transformation, let: Then the state equation of the spherical shell attitude control system is:   (32)

Control design
To design the control law conveniently, the system Eq.
Then the back stepping sliding mode control law is designed for the two subsystems respectively.
Firstly, for the system ∑ , the position error of the system is: The sliding mode function can be designed as: where and are positive constants. From Eq. (31), we have: (37) If the following control laws are designed: where is the upper bound of , is the upper bound of , sgn represented symbolic function, its definition is given by: Substituting Eqs. (38) and (39) into Eq. (37),we have: Due to the coupling effect between the two subsystems in the system, it is not reasonable to add the two control laws easily, and we need to introduce the control law corresponding to the coupling effect.
The total desired control law is set to: where is the coupled switching control law of the system in approach stage. Now we construct the second sliding plane: where is a positive constant.
To get the coupled switching control law, the CLF is chosen as: the first-order time-derivative of the CLF renders to: substituting Eqs. (37) into Eq. (45), we have: If the exponential approach law is taken for the system from the initial state to the switching surface, then: where and are positive constants. From Eq. (47), we have: and Secondly, for system ∑ , the position error of the system is: The sliding mode function is chosen by the following equation: where is a positive constant. From Eq. (31), we have: and Let us definite the following Lyapunov function: If the exponential approach law is taken for the system from the initial state to the switching surface, then: where and are positive constants. From Eq. (56), the control input can be obtained as: and According to the aforementioned discussion, it is known that the control law Eqs. (50), (57) can drive arbitrary tracking errors to converge to the origin.

Simulation
According to the designed hierarchical sliding mode control law, we carry out some computer simulations by using the Simulink box to demonstrate the performance of the designed controller.   According to Figs. 3-5, the response curves of roll angle, pitch angle and yaw angle have no oscillation, the rise time is less than 0.6 s, the transition time is less than 1 s, and the system has good dynamic performance.
According to Fig. 6, the input torque of the long axis motor has a small chattering, but does not affect the output of the system. According to Fig. 7, the input torque of the short axis motor have no chatter.
In order to further test the performance of the controller, we carried out a circular experiment. The expected trajectory of the underwater spherical robot is an arc with a radius of 0.5 m, that is = 0.5 m, = 0.5 m, the initial value of ( , , ) is (0, 0.5, 0). The value of is from 0 to 2 ⁄ . The disturbance of the current can be expressed as = 0.6 + 0.8sin(0.8 + /4).
The simulation results are shown in Figs. 8-11. Fig. 8. Change of the yaw angle Fig. 9. Change of Fig. 10. Change of Fig. 11. Trajectory of the robot According to Figs. 8-9, the absolute value of heading angle error is less than 0.2 rad, the absolute value of horizontal position error is less than 0.10 m, and the absolute value of vertical position error is less than 0.08 m.
According to Figs. 10-11, the trajectory of the underwater spherical robot is an arc with an approximate radius of 0.5 m.
Therefore, the experimental results show that the established dynamic control law based on this model are effective, which can realize the tracking of the motion track in the vertical plane, The controller has small overshoot and can well suppress chattering phnomenon and the control accuracy is ideal.
The above simulation results show the feasibility of the hierarchical sliding mode control law in the attitude adjusting control of the underwater spherical robot.