Quadrotor Formation Control via Terminal Sliding Mode Approach: Theory and Experiment Results

: This article presents a formation tracking control method for the operation of multiagent systems under disturbances. This study aims to ensure that the followers of a quadcopter converge into the desired formation while the center formation of the follower quadcopters tracks the leader’s trajectory within a ﬁnite time. The distributed ﬁnite-time formation control problem is ﬁrst investigated using the fast terminal sliding mode control (FTSMC) theory. A disturbance observer is then integrated into the FTSMC to overcome the model uncertainties and bounded disturbances. Subsequently, the Lyapunov function is proposed to ensure the stability of the system. It is shown that formation tracking control can be achieved even in the presence of disturbances. Simulation and experimental results verify the effectiveness of the proposed formation tracking control method compared to existing ones.


Introduction
In recent years, the research into the cooperative control of multi-agent systems has gained widespread interest. It has been increasingly implemented in various applications, such as flocking [1,2], target tracking [3], consensus [4], and machine learning [5,6]. As a classification of formation, formation tracking control can retain the formation configuration, and also track the reference trajectory of the leader's (or virtual leader's) position. It has been widely employed in various applications, such as unmanned aerial vehicles [7], maritime search and rescue [8], mobile robots [9], and so on. The formation tracking problem has drawn considerable attention in the academic domain with regard to overcoming the external disturbances and model uncertainties.
Various control methods have been analyzed to overcome the formation tracking control problem. The formation control based on output consensus feedback control for multiple nonlinear systems was proposed in [10]. The adaptive consensus method combined with a neural-network-based observer was proposed in [11] for nonlinear multiagent systems. Cooperative controllers were presented in [12] for mobile robots using a constructive algorithm. A synchronized control method was proposed in [13] to maintain the time-varying formation of a multi-agent system. Several formation control methods have been applied effectively to optimize the energy consumption and interaction frequency, such as impulse control and even-triggered control [14,15]. In [16], a distributed formation

•
We develop formation tracking control with a disturbance observer-the proposed method can provide faster finite-time convergence, less steady-state errors, and robustness; • The stability of the whole system is validated using Lyapunov theory; • We compare the proposed method with the existing algorithm in [41]; • We implement it on a real quadcopter platform for verification, which is lacking in [41].
The remainder of the article is organized as follows. The notations, graph theory, and the multi-agent system used in this study are presented in Section 2, while the observers in the external disturbances are shown in Section 3. The fast terminal sliding mode control methodology is presented in Section 4. Section 5 presents the numerical simulations and experimental results. Finally, Section 6 draws the conclusions of this paper.

Graph Theory
A weighted digraph, G = (V, ξ, A), is denoted as the information interaction of formation with N agents, where V = {1, . . . , N}, ξ ⊂ V × V, and A = a ij ∈ R N×N represent a vertex set with N nodes, a link edge set, and a weighted adjacency matrix, respectively. If (i, j) ∈ ξ, it indicates that the agent j can receive the information of the agent i (i = j). The element of A satisfies a ij > 0 if (i, j) ∈ ξ; otherwise, a ij = 0. For all i ∈ V, it is assumed that there are no self-loops (a ii = 0). Furthermore, the Laplacian matrix of a digraph, G, is defined as L = [l ij ] N×N , where l ij = −a ij , i = j, and l ii = ∑ N j=1 a ij . A digraph G is defined as a directed spanning tree if a directed path exists from one node to all the other nodes.
It is assumed that there is one leader agent and N followers. The root node is called the leader, which is labelled as 0, and the other nodes are called the followers, and are defined as 1, . . . , N. The information interaction between N follower agents is described by G. Consider a digraph G with N + 1 agents. Subsequently, the Laplacian matrix of the digraph, G, can be defined as L = L + B, where B = diag(b 1 , b 2 , . . . , b N ) is the communication weight matrix between the leader and the followers [28].

Multi-Agent System
This study considers a multi-agent system with N + 1 agents. We assume that the position model of each quadrotor is linearized [42] in a second-order system. The dynamics of the leader quadrotor can be assumed as: are the position, velocity, and control input of the leader, respectively. The dynamics of the ith follower can be assumed as: where are the position, velocity, and control inputs of the followers, and d i represents the disturbance. It is assumed that: Lemma 1. ( [28]). If a positive-definite Lyapunov function candidate, V(x), satisfies can be defined as the fast-finite-time stability, and T f is the settling time required to reach V(x) = 0,

Control Objective
The control objective of the proposed method is to design a formation tracking control approach based on fast terminal sliding mode control and a disturbance observer to achieve the following objectives: lim where i = 1, . . . , N, h = [h 1 , h 2 , . . . , h N ] represents the designed formation and T f is the finite time.

Remark 1.
It can be easily concluded that the finite-time fast terminal sliding mode formation tracking control is converted into a finite-time consensus problem when h = 0. (4) and (5) are the basic criteria of formation tracking control-that is, the forming of the formation, position, and velocity tracking. Equations (6) and (7) can guarantee that the geometric center from the follower agents can track the leader agent in finite time.

Disturbance Observer Design
This section is divided into subsections. It provides a concise and precise description of the experimental results, their interpretation, as well as the experimental conclusions that can be drawn. In this section, the disturbance observer is introduced to estimate the d i in (2). Theorem 1. Consider the multi-agent system (2) under assumption (1). A disturbance observer is designed via an auxiliary variable, h i (t), q i (t) as follows: where a i , b i , c i are positive constants with c i ≥ d i and 0 < α < 1. The disturbance error, d i =d i − d i , then converges to the neighborhood origin within a finite time.
Proof. The Lyapunov function is selected as: The first derivative of the Lyapunov function is achieved as: Drones 2022, 6, 172

of 16
Since c i ≥ |d i |, (10) is written as: (11) . Therefore, h i ≡ 0 for t ≥ t xi . From (8), the disturbance error can be calculated as: From the conclusion of Equation (11), we can obtain d i (t) ≡ 0.

Formation Tracking Control Design
The design of the formation tracking control approach includes two steps. A fast terminal sliding mode (FTSM) is first designed for a closed-loop system. A finite formation tracking control approach based on the disturbance observer and FTSM is then proposed for each follower agent.

Theorem 2.
Consider the multi-agent system, formation tracking errors, and the sliding surface given by (1), (2), (14), and (15). Consider that the following formation tracking control approach is implemented as: is the disturbance observer vector. The control objective given in Section 2.4 can then be obtained. This indicates that all the follower agents can track and maintain a specific formation configuration and can track the leader's trajectory.
Proof. The first derivative of sliding surface (15) can be achieved as: .
The Lyapunov function is selected as: Let The first derivative of the Lyapunov function (18) can be written as: .
. (19) where λ max (.) is the maximum eigenvalue of the corresponding matrix.
From the conclusion of Equation (12), we can obtain: .
Based on Lemma 1, the multi-agent system can converge within fast finite time, t, with . Therefore, all the follower agents form the formation and track the leader's trajectory within the finite time.

Remark 3. Equation (
2) has two parts: formation tracking control and disturbance rejection. In the case of no disturbance in the whole system, the disturbance observerd i should be zero. This means that the algorithm only conducts the formation tracking control task. In the presence of disturbance, the value ofd i should be different to zero, which is used for disturbance compensation. (16), to achieve good formation tracking performance, the parameters c, b, k, µ 1 , µ 2 , α need to be tuned. To obtain disturbance rejection, the parameters a i , b i , c i in (4) need to be adjusted. These parameters should be chosen carefully by trial and error to achieve the desired performance.

Simulation Results
In this section, the performance of the proposed method is compared with the original FTSM formation tracking control presented in [41]. Consider a team of three follower agents and one virtual leader agent in a network with a directed graph, as shown in Figure 1. The leader is labelled as 0, whereas the followers are labelled as 1, 2, 3. The initial positions of each agent are configured as: [3,4], p 3 (0) = [5,6]. The leader's trajectory is configurated as: Drones 2022, 6, 172 7 of 16 1. The leader is labelled as 0, whereas the followers are labelled as 1, 2, 3. The initial positions of each agent are configured as: The leader's trajectory is configurated as: We assume that the disturbance is injected into quadrotor 1 in the The desired formation is set as Two numerical examples will be considered. The parameters for formation tracking control are chosen as:

Case 1: Absence of Disturbance Observer Mechanism
In this case, with the original method in [41] (without the disturbance observer algorithm), the formation cannot be maintained well when tracking the leader's trajectory. To be more specific, the responses of the position errors in the second and third quadrotor cannot converge to zero values as in Figure 2. It should be mentioned that all velocity errors converge to zero values because the position errors converge to constant values, although there is an abrupt change at 10 s due to the injection of a disturbance in the first quadrotor. The corresponding 2D formation tracking control is shown in Figure 3. We assume that the disturbance is injected into quadrotor 1 in the x-direction as d 1x = 2.3. The desired formation is set as h T Two numerical examples will be considered. The parameters for formation tracking control are chosen as:

Case 1: Absence of Disturbance Observer Mechanism
In this case, with the original method in [41] (without the disturbance observer algorithm), the formation cannot be maintained well when tracking the leader's trajectory. To be more specific, the responses of the position errors in the second and third quadrotor cannot converge to zero values as in Figure 2. It should be mentioned that all velocity errors converge to zero values because the position errors converge to constant values, although there is an abrupt change at 10 s due to the injection of a disturbance in the first quadrotor. The corresponding 2D formation tracking control is shown in Figure 3.

Case 2: Presence of Disturbance of Observer Mechanism
In this case, the disturbance observer algorithm is considered in the formation control algorithm. In Figure 4, the position errors converge to 0 from the initial positions within 3 s. This means that all followers can track the desired position within 3 s. From 3 s to 50 s, the position errors can be maintained at 0 m, although there is a disturbance injected into the first agents in the x-direction, as mentioned above. This means that all agents can maintain the formation and track the desired leader's trajectory well under a disturbance. The corresponding 2D formation tracking control is shown in Figure 5. The disturbance estimation is shown in Figure 6. It is presented that the disturbance observer can provide a good estimation of the disturbance. Its value converges to 2.3.

Case 2: Presence of Disturbance of Observer Mechanism
In this case, the disturbance observer algorithm is considered in the formation control algorithm. In Figure 4, the position errors converge to 0 from the initial positions within 3 s. This means that all followers can track the desired position within 3 s. From 3 s to 50 s, the position errors can be maintained at 0 m, although there is a disturbance injected into the first agents in the x-direction, as mentioned above. This means that all agents can maintain the formation and track the desired leader's trajectory well under a disturbance. The corresponding 2D formation tracking control is shown in Figure 5. The disturbance estimation is shown in Figure 6. It is presented that the disturbance observer can provide a good estimation of the disturbance. Its value converges to 2.3.

Experimental Setup
Consider a directed graph with three follower agents and one virtual leader agent. The formation topology is shown in Figure 1. The Laplacian matrix and communication weight matrix are given as: The desired formation is set as h T The setup for the flight test is presented in Figure 7, which includes the three quadrotors and the Vicon capture system. The Vicon cameras can capture the position through markers attached to the quadrotor and send the images to the processing computer. Before the Vicon system starts to capture the object, the calibration of the reflective markers is conducted to determine the current position and orientation of the objects in real time. The processing computer is used to send the Vicon data to a laptop through the local area network (LAN).

Experimental Setup
Consider a directed graph with three follower agents and one virtual leader agent. The formation topology is shown in Figure 1. The Laplacian matrix and communication weight matrix are given as: The desired formation is set as    Figure 7, which includes the three quadrotors and the Vicon capture system. The Vicon cameras can capture the position through markers attached to the quadrotor and send the images to the processing computer. Before the Vicon system starts to capture the object, the calibration of the reflective markers is conducted to determine the current position and orientation of the objects in real time. The processing computer is used to send the Vicon data to a laptop through the local area network (LAN). The attitude, position control, and the sensor fusion algorithm are conducted onboard a Crazy quadcopter [43]. The attitude and position control loop are running at 500 Hz and 100 Hz, respectively. The GCS, which is run on the laptop, is used to receive the position data from the Vicon system, computing the formation tracking control algorithm, sending the commands to the follower quadcopter, and providing a user interface to switch between various missions and operational modes. The attitude, position control, and the sensor fusion algorithm are conducted onboard a Crazy quadcopter [43]. The attitude and position control loop are running at 500 Hz and 100 Hz, respectively. The GCS, which is run on the laptop, is used to receive the position data from the Vicon system, computing the formation tracking control algorithm, sending the commands to the follower quadcopter, and providing a user interface to switch between various missions and operational modes.

Case 1: Straight Line
The desired trajectory of the virtual leader is configured by The follower agents are assumed to track the desired trajectory of the leader agent. The movement of the quadrotor in the xand y-directions is controlled by the formation tracking control law presented in (12). The experiment is conducted in three steps. All the quadrotors are hovered at the altitude of 0.3 m in the first step, but these data are not presented for simplification. In the second step, the formation tracking control law is activated at 0 s after hovering at 0.3 m. Figure 8 illustrates the corresponding position, velocity, and acceleration of each agent in the xand y-directions. After 5 s, the follower agents can precisely track the desired trajectory from the leader agent. It must be noted that the velocity and acceleration of the quadrotors are kept within the desired ranges. The 2D performance of the formation is presented in Figure 9. It is shown that the follower agents can maintain the triangular shape while tracking the desired trajectory.  t  . The follower agents are assumed to track the desired trajectory of the leader agent. The movement of the quadrotor in the x-and y-directions is controlled by the formation tracking control law presented in (12). The experiment is conducted in three steps. All the quadrotors are hovered at the altitude of 0.3 m in the first step, but these data are not presented for simplification. In the second step, the formation tracking control law is activated at 0 s after hovering at 0.3 m. Figure 8 illustrates the corresponding position, velocity, and acceleration of each agent in the x-and y-directions. After 5 s, the follower agents can precisely track the desired trajectory from the leader agent. It must be noted that the velocity and acceleration of the quadrotors are kept within the desired ranges. The 2D performance of the formation is presented in Figure 9. It is shown that the follower agents can maintain the triangular shape while tracking the desired trajectory.

Case 2: Circular Trajectory
The follower agents are designed to track the circular trajectory of the virtual leader, given by p 0 = [0 −0.5] T if t ≤ 5 or t ≥ 25, p 0 = [0.5 sin(2π(t − 5)/10) 0.5 cos(2π(t − 5)/10)] T if 5 ≤ t ≤ 25. The experiment is conducted in two steps. All the quadrotors are hovered at the initial position, but these data are not presented for simplification. In the second step, the formation tracking control law is activated at 0 s. Figure 10 presents the corresponding position, velocity, and acceleration of each agent in the xand y-directions. After activating the formation control law (after 0 s), the three follower agents move towards the desired position, from where they can accurately track the circular trajectory after 5 s. The 2D performance of the formation is presented in Figure 11. It is demonstrated that the follower agents can maintain the circular shape while tracking the desired trajectory.  . The experiment is conducted in two steps. All the quadrotors are hovered at the initial position, but these data are not presented for simplification. In the second step, the formation tracking control law is activated at 0 s. Figure 10 presents the corresponding position, velocity, and acceleration of each agent in the x-and y-directions. After activating the formation control law (after 0 s), the three follower agents move towards the desired position, from where they can accurately track the circular trajectory after 5 s. The 2D performance of the formation is presented in Figure 11. It is demonstrated that the follower agents can maintain the circular shape while tracking the desired trajectory.     Figure 11. Trajectory performance in two dimensions of circular trajectory.

Case 3: Formation with External Disturbances
To demonstrate the effectiveness of the disturbance observer, an electric fan is used to generate a disturbance in the y-direction for the first follower agent. Figures 12 and 13 show the position, velocity, and acceleration performance of the quadrotors with and without the use of the disturbance observer, respectively. It is evident that the position of the first quadrotor and the formation shape obtained from the proposed method can be effectively maintained when a disturbance is introduced into the first quadrotor. However, when the disturbance observer method is not used, the first quadrotor deviates from the desired position and the formation shape is also affected. The full experiment work of Section 6.2 is conducted as video's link in Supplementary Materials. To demonstrate the effectiveness of the disturbance observer, an electric fan is used to generate a disturbance in the y-direction for the first follower agent. Figures 12 and 13 show the position, velocity, and acceleration performance of the quadrotors with and without the use of the disturbance observer, respectively. It is evident that the position of the first quadrotor and the formation shape obtained from the proposed method can be effectively maintained when a disturbance is introduced into the first quadrotor. However, when the disturbance observer method is not used, the first quadrotor deviates from the desired position and the formation shape is also affected. The full experiment work of Section 6.2 is conducted as video's link in Supplementary Materials.

Conclusions
In this study, the formation tracking control problem for multi-agent systems under external disturbances has been analyzed. Based on graph theory, the disturbance observer, finite-time stability theory, the properties of the Laplacian matrix, and the formation tracking control have been analyzed. The formation of the follower agents can achieve the desired configuration within a finite time and the center of the formation can simultaneously track the leader's trajectory. Three scenarios have been analyzed to verify the proposed theory. The results indicate that the follower can maintain the shape in a straight line or in a circular trajectory. It is observed that the advantage of the proposed method is that it is superior to the original method in the presence of disturbance. The results showed that with the integration of a disturbance observer (Equation (8)) into the control law (Equation (16)), the formation shape with the proposed method can be maintained well. This means that the convergence time for obtaining the desired formation shape is reduced. Therefore, the errors between the formation shape and desired formation in the proposed method converge to zero quicker than in the conventional one. However, the disadvantage of the proposed method is that the bound of the disturbance is known, and the velocity and acceleration cause some oscillations due to the high gain of the disturbance observer. Therefore, a future study will design a disturbance observer with unknown bounded disturbance and will consider the problem caused by the high gain of the disturbance observer. Moreover, future research will integrate collision avoidance into the control law to maintain the formation shape in the presence of obstacles.

Conclusions
In this study, the formation tracking control problem for multi-agent systems under external disturbances has been analyzed. Based on graph theory, the disturbance observer, finite-time stability theory, the properties of the Laplacian matrix, and the formation tracking control have been analyzed. The formation of the follower agents can achieve the desired configuration within a finite time and the center of the formation can simultaneously track the leader's trajectory. Three scenarios have been analyzed to verify the proposed theory. The results indicate that the follower can maintain the shape in a straight line or in a circular trajectory. It is observed that the advantage of the proposed method is that it is superior to the original method in the presence of disturbance. The results showed that with the integration of a disturbance observer (Equation (8)) into the control law (Equation (16)), the formation shape with the proposed method can be maintained well. This means that the convergence time for obtaining the desired formation shape is reduced. Therefore, the errors between the formation shape and desired formation in the proposed method converge to zero quicker than in the conventional one. However, the disadvantage of the proposed method is that the bound of the disturbance is known, and the velocity and acceleration cause some oscillations due to the high gain of the disturbance observer. Therefore, a future study will design a disturbance observer with unknown bounded disturbance and will consider the problem caused by the high gain of the disturbance observer. Moreover, future research will integrate collision avoidance into the control law to maintain the formation shape in the presence of obstacles.