Leader–follower close formation control for underactuated surface vessel via terminal hierarchical sliding mode

This article is concerned with the close formation problem of multiple underactuated surface vessels in the presence of model uncertainties, roll motion, and environmental disturbances. To effectively address these issues, a novel control scheme considering roll stabilization is designed by combing terminal hierarchical sliding mode control with Lyapunov direct method, which can quickly ensure a small formation error in a finite-time for vessels. Meanwhile, a new switching gain adaptation mechanism is utilized to reduce chattering and acquire faster adaptive rate without the excessive temporary tracking errors. Radial basis function neural network and finite-time observer are employed to deal with model uncertainties and disturbances, respectively. Furthermore, dynamic surface control technology is introduced to reduce the complexity of control law. Various simulations and comparison results are conducted to verify the effectiveness of theoretical results.


Introduction
Close formation control is receiving a considerable attention due to its important applications, such as cooperative exploration of ocean resources, underwater pipe-laying, and marine replenishment. 1 Since the relative distance among vessels is small in close formation, the vessels are easily subjected to this kind of nonlinear complex disturbances from adjacent vessels and ocean simultaneously, resulting in serious roll motion, which will affect the navigation of vessels and the operation of instruments. Meanwhile, the drift caused by rolling will bring formation errors and even cause collisions. For close formation control, not only the motion in the horizontal plane but also the roll motion should be considered. Besides the above challenge, there are more degrees of freedom (DoFs) to be controlled than the number of independent control inputs for underactuated surface vessels (USVs). 2,3 Therefore, it is a great significance to implement and maintain a predefined formation mode so that multiple USVs can cooperate to complete a given task.
Currently, there are several popular formation control strategies, such as behavior-based control, 4 event-triggered real-time scheduling control, 5,6 virtual structures, 7 and leader-follower architecture, [8][9][10] . Although the control methods are different in the existing literature, the research has always focused on the estimation of leader's information, obstacle avoidance, and compensation lumped uncertainties including actuator failure, marine disturbances, and system uncertainties. [11][12][13][14] Among them, most of the scholars have estimated the leader information by state estimator and lumped uncertainties by neural network approximation or takagi-sugeno fuzzy-approximation. [15][16][17] Coping with information limitation of leader, a robust adaptive formation control was applied by combining the minimal learning parameter (MLP) algorithm, neural networks, and disturbance observer. 18 To solve unavailable velocity measurements, the fuzzy sliding mode robust controllers with distributed and self-organized capability based on the center-of-swarm guidance scheme were designed to estimate the unmeasured velocities and complete the predefined formation. 19 With less communications among USVs, a velocity-free formation controller was constructed by the finite-time observer (FTO) and time-varying ln-type barrier Lyapunov function method. 20 To deal with model uncertainties and environmental disturbances, a sliding mode control scheme was developed by estimating unknown parameter and upper bound. 11 Under a static communication network, a distributed continuous controller was presented to perform time-varying formation tracking control in dynamic, complex, and unpredictable marine environments. 21 Using directed graph theories, backstepping and the MLP algorithm, a distributed robust formation controller with the MLP-based and auxiliary adaptive laws was acquired to complete the cooperative formation under uncertain dynamics and external disturbances. 22 Without the prior knowledge of the environment and reference trajectory, a finite control set model predictive control was devised to deal with the problem of formation collision avoidance. 23 To ensure connectivity preservation and collision avoidance among networked uncertain USVs with different communication ranges, an adaptive output-feedback controller was obtained to accomplish formation tracking problem. 24 And then, the swarm control strategy based on swarm center position guidance was developed for each vehicle to follow the desired path and avoid collisions autonomously. 25 In Liu et al., 26 a distributed formation control strategy was proposed by combining the graph theory and the robust compensation theory to achieve the desired formation trajectory and time-varying formation pattern and to adjust the attitude of vessel. To avoid the singularity problem, a linear partitioned sliding mode controller was presented to achieve the desired formation within a finite time. 27 For solving the problem of formation-containment tracking with multiple leader vessels, a practical formation controller was adopted based on distributed extended state observer. 28 In Fu and Wang, 29 a bioinspired model-based hybrid strategy was proposed to avoid the chattering problem in sliding mode and speed jump that occurs in the backstepping method. Besides this, some other control strategies can also be applied for formation control. 30,31 Although researchers have done a lot of scientific research on the formation control of USVs, we found that, only few research results have studied the close formation control of USVs and the effect of rolling for formation. However, the formation safety will be threatened in case of the serious roll disturbances and small formation distance. Based on the above considerations, a novel control scheme with roll stabilization is designed by combing terminal hierarchical sliding mode control (THSMC) with Lyapunov direct method. THSMC includes two parts: hierarchical sliding mode control and terminal sliding mode control. The former is coped with the underactuation of vessel, and the latter ensure the finite time convergence of the formation errors. Compared with the references, 11,32,33 the proposed THSMC has faster convergence rate and smaller formation error to ensure superior formation performance and navigation safety.
Main contributions can be summarized as follows: 1. As the roll motion in close formation cannot be neglected, a novel roll stabilization control strategy is adopted to compensate the complex disturbances caused by adjacent vessels and marine environment to ensure the smaller formation errors. 2. For the small distance among USVs and underactuated characteristics of vessels, the THSMC is presented to make the USVs quickly adjust its position and attitude in a finite-time to avoid collisions. Meanwhile, the sliding surface is designed in terms of the velocity errors and switching gain. Moreover, a novel switching gain adaptation mechanism helps to reduce chattering and acquires faster adaptive rate without the excessive temporary tracking errors. 3. On the basis of the surge, sway, and yaw motion, considering the roll motion, the number of the control law items increases greatly, resulting in complex control structure and huge calculation. In this article, dynamic surface control (DSC) technology is introduced to reduce the complexity of control law.
The rest of this article is organized as follows: The next section provides some preliminaries and problem formulations. Then, the control design and finite-time stability analysis of formation control are described. In the following, the results of conducted numerical simulations are illustrated. Finally, some conclusions and future works are summarized.

Problems formulation
Preliminaries Lemma 1. For any real numbers a > 0; b > 0 and 0 < l < 1, the Lyapunov condition of finite-time stability can be given in the form Problems formulation Figure 1 presents the basic geometric structure about two USVs moving in a leader-follower formation. This position and angle relationship can be extended to multiple USVs. The line-of-sight range r and angle l between the leader and the follower are defined as where x L ; y L ð Þ is the position of leader and x; y ð Þ is the position of follower.
Suppose there is a virtual vessel that can maintain the desired formation with the leader in real time. If the follower can track the virtual vessel, the desired formation can be completed. The virtual vessel trajectory is defined as Þis the position of virtual vessel and denotes position that followers need to track to complete the desired formation. b is the heading angle between the virtual vessel trajectory and the follower.
Therefore, the formation problem of leader and followers can be transformed into the path following of followers.
Assumption 2. The states of the desired trajectory Following the coordinate transformation, 32 we have Define the error system as Consequently, the path following problem is transformed into the stabilization of error system (3).

Control design and stability analysis
This section has two tasks to accomplish: One is the path following of followers in the horizontal plane, and the other one is the roll stabilization of USVs. We stabilize the surge and roll error subsystem with a common sliding mode, and stabilize the sway and yaw error subsystems simultaneously with hierarchical sliding mode due to underactuation of the USVs.

Subsystem control design
Step 1. Stabilizing position error z 1e .
Choose the following Lyapunov candidate Differentiating V 1 , we have Designing virtual control law as where k 1 is a positive constant. Then, the derivatives of Lyapunov function V 1 is negative Surge velocity error is defined as u e ¼ u À u d . To stabilize error u e , a sliding surface is chosen as where c 1 ; c 2 ; b 1 ; e f u are positive constants, and e f u denotes the boundary of approximation error, 1 < b 1 < 2, f u Àf u e f u , andf u is the estimation of f u ,ĥ 1 is the positive switching gain estimation.
Remark 4. The PI sliding mode surface can reduce the chattering of the system and also relax some assumptions in Sun et al., 11 such as the existences of first-order derivatives of environmental disturbance and control input.
Differentiating u e , we have To avoid computational expansion of _ u d , this virtual control laws pass through the first-order filter where e u is a positive constant.
Remark 5. Due to u d includes roll angle, the amount of calculation will be further increased greatly on the original basis when u d is the derivative. DSC is induced to obtain the derivative of u d without increasing the amount of computation. Equation (4) can be rewritten as According to equations (2) and (5), it can obtain the derivative of S 1 as Employing RBFNN to approximate f u , we havê The equivalent control law of the surge error subsystem is designed as Moreover, the saturation function f sat Á ð Þ is used to replace the sign Á ð Þ to avoid the chattering effectively, and described as The switch control law of this subsystem is chosen as where k 1sw is a positive parameter. The switching gain employs a new adaptive law as follows where k 2sw ; e 1 are positive parameters and e 1 represents sliding mode boundary threshold.
Remark 6. sign S 1 ð Þ is to make the switching gain to increase or decrease according to the sliding mode variable Þ guarantees a reasonable convergence trend according to the error; jS 1 j jj 1 À e 1 sign jS 1 j jj 1 Àe 1 ð Þ adjusts the amplitude of e jS 1 j jj 1 Àe 1 ð Þ to avoid too fast or slow convergence rate of sliding mode variables. The adaptation rate of switching gainĥ 1 is highly affected by e 1 .

Remark 7.
As seen from the proposed adaptive law, the upper and lower bound information of system uncertainty is not required. When jS 1 j jj 1 Þ . The adaptive law _ h 1 has a larger growth and attenuation rate to make the error jS 1 j jj 1 À e 1 faster convergence until S 1 reaches the vicinity e 1 of the sliding surface, and hence provides higher gain to ensure the good tracking performance in the transient response. Once the The adaptive law _ h 1 has a smaller growth and attenuation rate to reduce chattering and avoid excessive transient gain, while the sliding variable stays in the vicinity of the sliding manifold. This adaptation mechanism contributes to chattering reduction and the fast adaptation of switching gains without temporary large tracking errors.
The total control law of surge subsystem can be obtained as Define Lyapunov candidate function V 2 as follows Based on Lemma 5,d u is stable in a finite time andd u ¼ 0.
Designing the adaptive law _ W 1 as follows As k 2sw S 1 j j jS 1 j jj 1 À e 1 sign jS 1 j jj 1 Àe 1 ð Þ e jS 1 j jj 1 Àe 1 ð Þ ! 0 andĥ 1 S 1 f sat S 1 ð Þ > 0, _ V 2 can be rewritten as Using Young's inequality, we obtain , and 0 < l < 1, the following inequality can be obtained Remark 8. According to Lemma 1, inequality (9) satisfies the theory of finite time stability, that is, the corresponding approximation error variableW 1 is semi-global practical finite-time stable. Furthermore, the finite time stability of formation errors can be guaranteed by extending the inequality to the whole error system. Since the upper and lower bounds of u e are determined by u and u d , u and u d are bounded, so u e is also bounded function. Define Similarly, we can obtain Combining _ V 2 with equations (9) and (10), it holds that Step 2. Stabilizing position and orientation error z 2e ; z 3e . Since subsystem z 2e has no control input, we utilize the hierarchical sliding mode to design control input to stabilize both subsystem z 2e and z 3e . Firstly, we design two first-order sliding surfaces. Then, the second-order sliding surface is formed by two first-order sliding surfaces on certain ratio.
Choose the following Lyapunov candidate Differentiating V 3 , we have Designing virtual control law as where k 2 and k 3 are positive constants. Then, the derivatives of Lyapunov function V 3 is negative.
Sway and yaw velocity errors are defined as To stabilize error v e , the first first-order sliding surface is chosen as where c 3 ; c 4 ; b 2 are positive constants and 1 < b 2 < 2.
Differentiating v e , we have To avoid computational expansion of _ v 1d , this virtual control laws pass through the first-order filter where e v 1d is a positive constant. Equation (11) can be rewritten as Differentiating s 1 along with equations (2) and (12), we have Employing RBFNN to approximate f v and f r , we obtainf wheref v andf r are the estimations of f v and f r ,Ŵ 2 andŴ 3 are the estimations of W Ã 2 and W Ã 3 . The equivalent control law of the sway error subsystem is designed as To stabilize error r e , the second first-order sliding surface is chosen as where c 5 ; c 6 ; b 3 are positive constants and 1 < b 3 < 2.
Differentiating r e , we have To avoid computational expansion of _ r d , this virtual control laws pass through the first-order filter e r _ a r þ a r ¼ r d where e r is a positive constant. Equation (13) can be rewritten as Differentiating s 2 along with equations (2) and (14), we have The equivalent control law of the yaw error subsystem is designed as t 22eq ¼ m 33 À c 6 r 2Àb 3 e c 5 b 3 Àf r þ _ a r Àd r Defining the second-order sliding mode surface as The switch control law is designed as where k 3sw is a positive parameter. The switching gain employs a new adaptive law as follows where k 4sw ; e 2 are positive parameters and e 2 represents sliding mode boundary threshold. The total control law of the sway and yaw subsystem can be obtained as Remark 9. For underactuated systems, there is not an independent sway actuator to perform sway motion. Therefore, USV accomplishes the sway motion indirectly through the yaw control. Different from most nonlinear control, this hierarchical controller has the double layer structure. In the first layer, the terminal sliding surfaces are hierarchically designed for the sway subsystem and yaw subsystem, respectively, and in the second layer, the whole sliding surface is designed as the linear combination of terminal sliding surfaces. Therefore, the control input t 2 includes sway force t 21eq and yaw moment t 22eq , which can ensure the error stability of the sway and yaw subsystem. Differentiating S 2 along with _ s 1 ; _ s 2 , we have Define the following Lyapunov candidate function Based on equations (15) to (17), the derivative of V 4 can be written as whered v ;d r are stable in a finite time on Lemma 5 and d v ¼d r ¼ 0.
Designing the adaptive law _ W 2 ; _ W 3 as follows can be rewritten as Using Young's inequality and Lemma 2, we obtain Similarly, we can obtain Combining _ V 4 with equations (18) and (19), it holds that Step 3. Stabilizing rolling error z 4e . Choose the following Lyapunov candidate Differentiating V 5 , we have Designing virtual control law as where k 4 is a positive constant.
Then, the derivatives of Lyapunov function V 5 is negative.
Roll velocity error is defined as p e ¼ p À p d . To stabilize error p e , a sliding surface is chosen as where c 9 ; c 10 ; b 4 ; e f p are positive constants, and e f p denotes the boundary of approximation error, 1 < b 4 < 2, f p Àf p e f p ,f p is the estimation of f p ,ĥ 3 is the positive switching gain estimation. Differentiating S 3 , we have Employing RBFNN to approximate f p , we havê wheref p is the estimation of f p ,Ŵ 4 is the estimation of W Ã 4 . The equivalent control law of the roll error subsystem is designed as The switch control law of this subsystem is chosen as where k 5sw is a positive parameter. The total control law of roll subsystem can be obtained as The switching gain employs a new adaptive law as follows where k 6sw ; e 3 are positive parameters and e 3 represents sliding mode boundary threshold. Define the Lyapunov candidate function as follows Differentiating V 6 along with equations (20) to (22), we have whered p is stable in a finite time andd p ¼ 0.
Designing the adaptive law _ W 4 as follows Asĥ 3 S 3 f sat S 3 ð Þ > 0, _ V 6 can be rewritten as Using Young's inequality and Lemma 2, we obtain , so the trajectory of z t ð Þ does not exceed the set O z . In conclusion, the whole nonlinear error system is semiglobal practical finite-time stable.

Simulation
In this section, the experiments of the control system are executed in MATLAB R2014a. Numerical simulations are included to demonstrate the efficiency and effectiveness of the proposed scheme in robustness and transient performance for the USV. Detailed model information of the container ship 32 is given in Table 1 and relevant control parameters are listed in Table 2.

Environmental disturbances
The external disturbances acting on USVs are mainly caused by the ocean and the induced wave generated by the adjacent vessels. The P-M wave spectrums are adapted to produce these disturbances, which have been defined as an International Towing Tank Conference standard. One harmonic wave component is now represented by five parameters: wave spectrum S ! a ; r ð Þ, direction r , frequency ! a , amplitude ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2S ! a ; r ð ÞD!D p , and phase angle ab . The total surface elevation h x; y; t ð Þ of all wave components at the point x; y ð Þ at time t for N frequencies and M directions will be h x; y; t sin ! a t þ ab À k a x cos r þ y sin r ð Þ ð Þ where k a is the wave number, which equals 2p=l a , l a ¼ 0:2583 is the wave length. Figure 2 shows waves with a significant wave height H s ¼ 3 m (sea state code is 5), which is caused by ocean. The waves shown in Figure 3 are composed of the waves in Figure 2 and the waves H s ¼ 5 generated by the adjacent USVs.
Sørensen 36 has detailed the description and construction of the surge, sway force, yaw, and roll moment and they are omitted in this section.

Formation performance
A group of three USVs in a leader-follower formation is considered. The desired formation configuration is set as: r d1 ¼ r d2 ¼ 15 m, l d 1 ¼ Àp=2 rad, and l d2 ¼ p=2 rad. Initial states of the leader are given as And the trajectory of the leader is generated by the following kinematics equations where the yaw angular velocity r L of the leader satisfies that r L t ð Þ ¼ 2 =s when 20s t 100 and r L t ð Þ ¼ 0 =s otherwise.  Table 2. Parameters of control.   Initial states of follower 1 and follower 2 are given as x 1 ; y 1 ; 1 ; 1 ½ ¼½ À 6m; 18m; À4 0 ; 5 0 T , x 2 ; y 2 ; 2 ; 2 ½ ¼ ½À6m; À18m; 5 0 ; 5 0 T , and u 1 ; v 1 ; r 1 ; p 1 ½ ¼u 2 ; v 2 ; r 2 ; ½ p 2 ¼ ½0m=s; 0m=s; 0 =s; 0 =s T . For follower 1 and follower 2, control parameters are listed in Table 2. RBFNNs for f u ; f v ; f r and f p include 17 nodes, with width 2 and centers spaced in À5m=s; 5m=s ½ for the surge velocity, À2m=s; 2m=s ½ for the sway velocity, À5 =s; 5 =s ½ for the yaw velocity, À1 =s; 1 =s ½ for the roll velocity. Formation trajectories of three USVs are shown in Figure 4. It can be observed that the prescribed formation can be guaranteed and followers are well tracked the leader under the uncertain dynamics and environmental disturbances.
Formation tracking errors of the followers are shown in Figure 5, where e 1 ; e 2 ; e 3 ; e 4 represent the tracking error in position x; y and angle ; , respectively. From Figure 5, it can see that the tracking error and attitude error e 1 ; e 2 ; e 3 ; e 4 are converge to a small neighborhood of the origin, which indicates the followers can track the desired trajectory with bounded errors by the proposed controller. Figure 6 shows the learning behavior of RBFNNs. It can be observed that the model uncertainties in the surge, sway, yaw, and roll motion are efficiently compensated by the outputs of RBFNNs.
To verify the robustness of the proposed controller under systematical parametric uncertainties and environmental disturbances, the dynamic sliding surface is also displayed in Figure 7.

Comparison results
As can be seen from Figure 8, the error of range r e between the leader and the follower 1 can rapidly converge to a  small neighborhood of the origin under the adjustment of these controllers, despite the disturbances and uncertainties, which indicated that these different controllers have stronger anti-disturbance ability. The sliding mode control (SMC) with parameter estimation 11 is proposed to solve the problem of the unknown plant parameters and environmental disturbances in formation control, which enhances the robustness of the closed-loop system, and reduces the chattering of the control system by building a continuous function. However, roll motion is not considered in this method, and roll compensation cannot be carried out in close formation, while the horizontal plane error caused by rolling can only be indirectly compensated through surge and yaw control, so it can be seen in Figure 8 that the formation error is always large. The hierarchical sliding mode control (HSMC) with fin roll reduction 32 is employed to deal with the underactuation of the system in the presence of uncertainties and nonlinearities. Although the roll motion is effectively controlled, the PD sliding surface still causes the chattering of the control system. In addition, this method cannot guarantee the formation error convergence in a finite time, which increases the possibility of collision among adjacent USVs. The terminal sliding mode control (TSMC) with a finite-time observer 33 is addressed for trajectory tracking of USVs with complex unknowns disturbances. This TSMC is modified by adding the roll motion of freedom to be more suitable for performance comparison with the other methods. From Figure 8, since this method includes the finite-time disturbance observer and roll motion control, the ocean disturbances are compensated in a finite time and the roll parameter oscillation is greatly reduced, so the formation error is less than the SMC and HSMC. Meanwhile, from the enlarged image in Figure 8, this method has faster convergence speed than the SMC and HSMC. The proposed THSMC can quickly ensure a small formation error in a finite-time for vessels by applying roll stabilization technology, finite time stability theory, and robustness sliding mode control. Meanwhile, a new switching gain adaptation mechanism is utilized to reduce chattering and acquire faster adaptive rate without the excessive temporary tracking errors. Therefore, the proposed THSMC has faster convergence rate and smaller formation error than the above methods.
Similar to Figure 8, Figure 9 also shows that the proposed method has better performance than SMC, HSMC, and TSMC in formation orientation errors. To further demonstrate the effectiveness of the proposed method, the root mean square values of formation range errors and orientation errors are listed in Table 3. These results confirm the superior control effect of the proposed THSMC scheme.

Conclusion
In this article, a novel control scheme is presented to accomplish the leader-follower close formation control for USVs under the model uncertainties, roll motion, and environmental disturbances. To ensure the formation of USVs within a finite time, THSMC technology is designed and a new switching gain adaptation mechanism is applied to    reduce chattering and acquires faster adaptive rate. Furthermore, RBFNN is used to approximate the model parameters which vary with their own state. In the meantime, FTO is employed to quickly and accurately estimate the disturbances from the winds, waves, currents, and the adjacent vessels with zero error. Besides this, the derivative of the virtual control law is more complex than the original one after considering the roll motion. To simplify the control law, the DSC is introduced. Finally, simulations and comparison results show that the proposed method has better formation control effect.
In the future, our work will consider more constraints, such as input saturation, dead zone, actuator faults, and so on. Avoidance among adjacent vessels and obstacles may also be considered in close formation. Besides, since the plant in this article is 4-DoF, it is necessary for rollover prevention to avoid excessive roll motion.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.