Adaptive Robust Time-Varying Formation Control of Quadrotors under Switching Topologies: Theory and Experiment

: This paper investigates a practical time-varying formation control method for quadrotors subjected to disturbances, uncertainties, and switching-directed topologies. A fully distributed formation control scheme is proposed using a linear-velocity independent position controller (LVIPC) and a nonsingular terminal sliding mode attitude controller (NTSMAC). A distributed observer is adopted to eliminate the measurement of linear-velocity states, and only local neighbor states are needed to realize formation ﬂight. A time-varying nonsingular terminal sliding mode manifold is designed to suppress the reaching phase and ensure the ﬁnite-time convergence. Adaptive estimators are employed to remove the reliance on the prior knowledge of the upper bound of lumped uncertainties. It is then proven that all the closed-loop signals are bounded under the proposed method. Comparative experimental results based on a practical outdoor hardware solution are presented to conﬁrm the effectiveness of the suggested control algorithm.


Introduction
In recent years, the formation control technology of unmanned aerial vehicles (UAVs) has received widespread attention. Compared to a single UAV, a formation of multiple UAVs has greater application efficiency and enormous potential in the aerospace domain due to its capacity for aerial environmental surveillance, cooperative remote sensing, and even military applications [1][2][3].
As a typical small UAV, a quadrotor (QR) has advantages such as its light weight, simple structure, maneuverability, and hovering capability [4], making it an ideal platform for formation control. Due to its well-known under-actuation, strong coupling, and nonlinear characteristics [5], the QR system can be transformed into a dual-loop structure. However, the position control (outer-loop) highly relies on attitude tracking (inner-loop) [6], which makes control design challenging. Nevertheless, most existing results on QR formation control assumed that QR has an attitude autopilot [7][8][9] and only focuses on the position control design. The few studies that involved attitude control usually adopted simplified models under the "small-angle approximation" assumption [10][11][12], which narrows the application scope. Moreover, in practical application, environmental disturbances and system uncertainties heavily impact QR's flight, with the attitude control system being particularly sensitive to these effects [13]. Therefore, a robust attitude controller based on a full nonlinear model is critical for QRs to achieve the desired formation flight. A variety of robust control strategies have been studied recently, including H-∞ control [14,15], sliding mode control (SMC) [16,17], super-twisting control [18,19], and integral backstepping control [20,21]. Among these, SMC is widely used in the control of satellites, aircrafts, and robots owing to its fast response, easy implementation, and robustness. Nevertheless, conventional SMC based on linear hyperplanes can only guarantee asymptotic convergence [22,23]. In order to obtain finite-time convergence, the nonlinear hyperplane-based terminal sliding mode (TSM) and its variants-the nonsingular terminal sliding mode (NTSM) and the fast nonsingular terminal sliding mode (FNTSM) techniques-have emerged. In [24], the finite-time tracking control of a QR under input delay, uncertainty, and disturbance was addressed by combining NTSM with adaptive laws. In [25], adaptive super-twisting NTSM tracking control was designed for a QR with bounded disturbances to decrease the chattering phenomena. In [26,27], adaptive FNTSM controllers were adopted to ensure the finite-time convergence of the QR's attitude states subjected to disturbances. However, there are still obstacles and limitations to its practical application. Firstly, the system state is sensitive to disturbances and uncertainties during the reaching phase, before entering the sliding phase, which degrade the robustness of the system [28][29][30]. Secondly, these methods can only ensure that the convergence time is bounded but cannot be easily adjusted, which may cause inconvenience in engineering applications. To address these problems, a novel time-varying nonsingular terminal sliding mode (TVNTSM) manifold is adopted in this paper. To the best of our knowledge, the application of TVNTSM in formation control is still very scarce [31][32][33].
The role of the formation position controller of the QR is to exchange information with neighboring QRs, to obtain the tracking error, and to generate the command signal for inner-loop and thrust. In the past few decades, owing to its scalability and distributed nature [34,35], the consensus theory has stood out from among various formation control approaches, including behavior-based [36,37], virtual structure [38,39], and leaderfollower [40,41] approaches. In [42], the formation control of multiple QRs subjected to perturbations was executed with the use of a consensus error model and adaptive laws. In [43], modified model predictive control was applied to realize the formation flight of networked QRs subjected to disturbances. In [44], the predefined-time formation control for QR clusters was realized by employing the state observer and SMC. However, the formation pattern was time-invariant in these works. In practical applications such as target enclosing [45] and area coverage [46], the formation pattern needs to be adjustable in order to obtain a wider range of detection angles and to be able to capture more varied information. In [47], a PD-like controller was designed for the time-varying formation control (TVFC) of multiple UAVs with delays and uncertainties. In [48], the distributed finite-time TVFC of multiple QRs with aperiodic sampled data was studied. In [49], the neural adaptive TVFC of multiple QRs with faults was studied in a practical application. However, only fixed topology was adopted in the results. To maintain a reliable connection, the interconnection should be switchable to accommodate the varying distance between UAVs and possible signal blocking during the formation adjustment [50]. In [51][52][53], the eigenvalues of the Laplacian matrix of networks were required to achieve formation control. However, such global information is hard to obtain in large-scale formations [54]. In [55][56][57], the fully distributed schemes without global information were investigated. Nevertheless, these methods still have limitations. Firstly, in addition to position state, formation members also need to measure velocity state, which can be inaccessible due to the measure noise. Secondly, these methods lack practical flight verification, and most of the existing experimental results are based on indoor solutions such as motion capture systems or UWB positioning. However, these indoor experimental schemes cannot well reflect wind disturbance and other factors in outdoor natural environments. Therefore, outdoor experiments based on practical hardware is conducted in this paper.
Based on the above discussions, this paper investigates a fully distributed and adaptive robust time-varying formation control method for QRs with switching topology. Compared to existing research, the main contributions of this paper, both in theory and application, are as follows: 1.
In terms of theory, firstly, for easy application, adaptive laws were adopted to remove the reliance on the prior knowledge of the unknown upper bound of lumped uncertainties. Secondly, the TVNTSM manifold was designed to suppress the impact of the reaching phase on system robustness and guarantee the convergence of the system state in adjustable finite time, thereby improving practicality. Thirdly, distributed observers were employed to eliminate the measurement of linear velocity, with the possibility of realizing formation control without any global topology information, thereby making it fully distributed. Fourthly, both formation pattern and directed topology could be dynamically adjusted, making it suitable for scenarios such as target enclosing, area coverage, and target tracking.

2.
In terms of application, this study differs from most previous research that only conducted experimental verification in ideal indoor environments based on motion capture or UWB positioning. Instead, an outdoor scheme was designed for this study, with all QRs flying in natural disturbed environments. Their positions were provided by the RTK system in accordance with actual working conditions. In addition, unlike most previous research that relied on a robot operating system (ROS) with high hardware requirements or Wi-Fi with a limited range to establish the interconnection of UAVs, this paper utilized bi-directional wireless modules to build the QR network, such that total control could be achieved through micro control unit (MCU)-based hardware solutions, which is currently the mainstream solution used in the drone industry.

Notations
Let a ⊗ b denote the Kronecker product of matrices a and b, and λ min (•) and λ max (•) respectively indicate the minimum and maximum eigenvalues of a matrix. Let 0 denote the zero matrix with a proper size, and s (•) and c (•) denote sin(•) and cos(•). I m denotes the m-dimensional identity matrix. |•| denotes the absolute value of a real number, • the Euclidean norm of a vector, and • F the Frobenius norm of a matrix. Let (•) k denote the kth row of a matrix. For a vector X = [X 1 , · · · , X n ] T , let sig β (X) = [sig β (X 1 ), · · · , sig β (X n )] T with sig β (X i ) = |X i | β sign(X i ).

Graph Theory
A directed graph of N QR followers can be defined by G F = {Q, E , A} with the node set Q = {q 1 , q 2 , · · · , q N }, the edge set E ⊆ Q × Q, and the weighted adjacency matrix A. A = [a ij ] ∈ R N×N is defined as a ij => 0, if (q i , q j ) ∈ E , otherwise a ij = 0. a ii = 0 for all i ∈ Σ = {1, 2, · · · , N}. The set of neighbors of the i-th QR is defined by N i = q j |(q i , q j ) ∈ E . The Laplacian matrix of G F is denoted by L F = [l F ij ] ∈ R N×N , with l F ij = −a ij (i = j) and l F ii = ∑ q j ∈N i a ij . The total flight time interval of the QRs is defined as [0, T t ), which can be divided into an infinite sequence of bounded time intervals [t p , t p+1 )(p ∈ Π), where Π represents all natural numbers, with t 0 = 0. The dwell time T d meets 0 < T d ≤ t p+1 − t p ≤ T t , and the graph is fixed during [t p , t p+1 ). G F A is denoted as the set of all possible graphs, with the index set being is defined as the switching signal. The follower graph, Laplacian matrix, and neighbor set of the i-th QR , respectively. If the leader q 0 is a neighbor of the i-th QR at time t, then the connection weight b i = 1, otherwise, b i = 0. The whole graph of N QRs and the leader at time t is G S(t) , with the corresponding Laplacian matrix being with B S(t) = diag{b 1 , b 2 , · · · , b N }. If there is a node that has a path to all other nodes, it is said that G S(t) has a directed spanning tree. Lemma 1. W S(t) is positive-definite when there is a directed spanning tree in G S(t) , with the leader q 0 being the root node. Assumption 1. All the possible graphs of G S(t) have a directed spanning tree rooted at q 0 .

Problem Formulation
Consider N QRs following a leader, with their topology described by G S(t) . The nonlinear dynamics of the QR can be obtained as follows through Newton's laws [58]: 3 (1) T are position, linear velocity, and Euler angle in an earth-fixed frame, respectively. Ω i = [p i , q i , r i ] T represents the angular velocity in a body-fixed frame. m i and J i = diag J ix , J iy , J iz are the total mass and inertia matrix. T i denotes the total lift, e 3 = [0, 0, 1] T and g represent the gravity. K it = diag K ixt , K iyt , K izt and K ir = diag K ixr , K iyr , K izr are the translational and rotational damping matrices, respectively. C ir = S(Ω)J i represents the Coriolis term. τ i = [τ i1 , τ i2 , τ i3 ] T and τ id are control torque and disturbance acting on the QRs. R it , R ir and S(Ω i ) are expressed as follows: In order to facilitate the subsequent control design, the attitude dynamics can be transformed from the body-fixed frame to the earth-fixed frame. Taking the time derivative of the kinetics part in (2), we have the following: Combining (3) and the attitude dynamics in (2), we have: where J i = J i0 + ∆J i , C ir = C ir0 + ∆C ir and K ir = K ir0 + ∆K ir are the nominal and uncertain terms of the QR's attitude model, with Then, (4) can be rewritten as follows: is the second-order differentiable motion mode function that defines the movement of the i-th QR with respect to the leader, k = 1, 2, 3. The leader's position and velocity are P , v 0y , v 0z ] T , and the bounded control input U 0 (t) =V 0 (t) of the leader is unknown to all follower QRs, thus satisfying U 0 (t) ≤ U M . Based on the consensus theory, the following definition is given: The formation tracking is said to be achieved when The snap shots of a rotating formation with N = 3 at time t 1 , t 2 are shown in Figure 1 to illustrate Definition 1. One sees that if P i − P 0 − Υ i = 0 for ∀i ∈ 1, 2, 3, then the triangle P 1 P 2 P 3 would precisely be the expected pattern defined by Υ 1 , Υ 2 , Υ 3 , namely the formation pattern is formed. Then, the QRs will follow the leader P 0 along its trajectory to achieve formation tracking.

Control Objective
The objective of this paper is to enable, under the proposed TVFC method, the trajectory of the leader P 0 (t) to be tracked and the predefined time-varying formation pattern Υ P (t) to be formed by follower QRs subjected to uncertainties and disturbance in (5). The detailed control objectives are shown below: • The QR's formation pattern and directed topology can be dynamically adjusted under the fully distributed TVFC protocol; • The measurement and transmission of the QR's linear-velocity can be eliminated by distributed observers; • The influence of the reaching phase can be suppressed by adopting TVNTSM, and the finite convergence time of the attitude tracking error can be adjusted; • The reliance on the prior knowledge of the unknown upper bound of lumped uncertainty d i can be removed by adaptive laws.

Main Results
The desired TVFC scheme can be divided into a linear-velocity independent position controller (LVIPC) and a nonsingular terminal sliding mode attitude controller (NTSMAC), as shown in Figure 2. The inputs of its outer-loop, including the local neighbor information , leader information P 0 , and pattern vector Υ P were transferred to the LVIPC.
Meanwhile, the linear velocity estimation valueV i was generated by the observer, and the global information was estimated by an adaptive coupling weight. Then, the output U iP of LVIPC was utilized to calculate the desired thrust T iC and command attitude signal φ iC , ψ iC . The inputs of the inner-loop, including φ iC , ψ iC , and ψ iC , were entered into the NTSMAC. Then, the attitude-tracking errors e iA and e iΩ were used to construct the TVNTSM manifold s i (t) and adaptive laws D ikm for lumped uncertainty rejection. Finally, T iC and the output τ i of NTSMAC were applied to the i-th QR for the TVFC.

Design of LVIPC
For each QR, the position and velocity tracking errors are constructed using the local neighbor's information as follows: where Λ ij = Υ i − Υ j ,V i is the estimation of the linear velocity of the i-th QR, which is given by an observer that needs to be designed later. Let E i (t) = e iP (t) + e iV (t) and regard the control input of the i-th QR's position subsystem (1) as U ip (t) = −ge 3 + R it T i m i e 3 , and U ip can now be designed as follows: where Φ ≥ U M is the gain constant, and the nonlinear function is the adaptive law used to estimate the global information for the current graph G S(t) , with W i (0) > 0. w i is a positive design parameter. Then, the linear velocity observer is designed as follows: Lemma 2. According to [59], the following three inequalities hold simultaneously for an asymmetric matrix = 11 12 T 12 22 Theorem 1. Under Assumption 1, along with the control law (9) and the observer (10), a group of N QRs described by position system (1) will form the desired time-varying formation pattern Υ P and track the leader along its trajectory P 0 (t).
By substituting the control input (9) into the QR's position dynamics (2), the closed-loop dynamics of the QRs can be constructed as follows: Take the time derivative of κ i (t) and combine it with (10), we then have the following: Transform the observer state as follows: and by combining (11)-(13), we have the following equation: Substitute the designed U iP into (14), and notice that: which yields the following: and their time derivatives are expressed as follows: Take the time derivative of κ κ κ i (t) and combine it with the expression of the observer (10) and we obtain the following: Then, the error dynamics in (17) and (18) can be expressed in a compact form as follows: T as the state of the following QR formation error system:ξ Select the Lyapunov candidate as follows: . W 0 and µ 0 are positive constants. By combining them with (20), the time derivative of V P (t) is as follows: Notice that in (22), then the following inequality can be obtained according to the expression of µ.
Referring to the expression ofẆ i (t) in (9) and λ 1 , we have the following: By combining (24)-(26), the following inequality can be obtained from (22): (27). Based on the expressions of U P , ξ and E(t), the following can be obtained: (28) where the following can be noticed: Then, (28) can be transformed into: where Φ can be selected as Φ ≥ U M to ensure that 2ξ T (χ ⊗ I 3 )U P ≤ 0. Finally, go back to (27), and the equation can be expressed as follows: One can see that χ has a form that is consistent with Lemma 2 and can therefore be rewritten as a block matrix: By selecting W 0 > 2 λ 2 and Ψ > K t , it has χ 11 < 0 and χ 22 < 0. By choosing a sufficiently large µ 0 , the following inequality will hold: which implies that χ < 0 refers to Lemma 2, that is,V P ≤ 0, therefore V P is bounded. According to LaSalle's Invariance principle [60], the asymptotic convergence of the error state ξ to zero is guaranteed, which means the desired TVFC defined by Υ P and P 0 can be realized using the control law (9) and the observer (10) for the N QRs described by (1) subjected to switching topology G S(t) .

Design of NTSMAC
The command signal of NTSMAC, A iC (t) = [φ iC , θ iC , ψ iC ] T , and the thrust T iC of the i-th QR can be extracted by U iP = [U ixP , U iyP , U izP ] T , which was designed earlier and can be derived as follows: where the free variable ψ iC is set as ψ iC = 0 for convenience.

Remark 1.
It is feasible to ensure that U izP + g is constantly positive to avoid singularity because U izP is bounded by selecting a suitable gain constant Φ i , w i and K itVi ,Ϋ i is in a certain range when calculating θ iC in (33).
To facilitate the control design, some useful lemmas and reasonable assumptions are posted: Assumption 2. During the formation flight, the attitude of the QRs satisfy |φ i | < π 2 and |θ i | < π 2 .

Remark 2.
In most practical applications, except for some special QRs such as racing drones, the roll and pitch attitude angles do not usually reach π 2 due to the constraints of mission payloads and operational quality requirements [49]. As a result, the maneuvering actions are relatively mild. Therefore, Assumption 2 is reasonable and practical.

Lemma 3.
For a positive definite function M(t), if its time derivative satisfies the extended forṁ M(t) ≤ −λ 0 M α 0 , ∀t > t 0 with λ 0 > 0 and 0 < α 0 < 1, then M(t) will converge to zero in a finite time described by Lemma 4. According to [62], the upper bound of the lumped uncertainty d i can be expressed as follows: where D ik1 , D ik2 , D ik3 (k = 1, 2, 3) are unknown positive constants, and A ik are elements of A i .
Let the attitude tracking errors of i-th be defined as e iA = A i − A iC = [e i1A , e i2A , e i3A ] T and e iΩ =Ȧ i −Ȧ iC = [e i1Ω , e i2Ω , e i3Ω ] T , and the following error system will be obtained: Now, design the TVNTSM surfaces of the i-th QR as follows: where k = 1, 2, 3 is the index of the attitude channels. k iS > 0 is a positive number, 1 < β i < 2, and the piecewise continuous function h ik (t) is the element of h i (t) = [h i1 , h i2 , h i3 ] T and is expressed by: where T i is a given switching time. To suppress the reaching phase, h ik (t) is chosen to satisfy the following: which implies that the initial state of the attitude error system (35) was right on the sliding surface from very beginning, h ik (t) is continuous, and there is no rapid change in e ikA and e ikΩ at t = T i . By taking the time derivative of s ik and combining it with (35), the following is obtained: Letṡ ik = 0 and d ik = 0, and the equivalent control law can be obtained as follows: Moreover, under the influence of d i , the attitude error states will not stay on the sliding surface even if s ik (0) = 0. Therefore, the switching control law is designed as follows: is the estimation of the unknown upper bound of d ik , and the saturation function f sat(s i (t)) is adopted to eliminate the chattering problem [63] and is expressed as follows: The update laws are designed as follows: Now, the overall control torque of the i-th QR can be obtained as follows: Under Assumption 2, if the TVNTSM manifold is represented by (36), with the piecewise continuous function (37) satisfying condition (38), and if the control torque is designed according to (44) with the adaptive laws in (43), the tracking error of the i-th QR attitude subsystem described by (2) will converge to zero in finite time.
According to Lemma 2, V ik will converge to zero in finite time T ikF ≤ 2 C ik V 1 2 ik (0), which means that the convergence of s ik andD ikm , m = 1, 2, 3 will also occur in finite time. By setting the attitude tracking error on the sliding surface at the very beginning of the QR's motion, that is, s ik (0) = 0, then V ik (0) is reduced and the upper bound of T ikF is lowered, thereby shortening the convergence time. Furthermore, once s ik = 0 after t = T ikF , the following is obtained from (36): Choose the following Lyapunov function candidate: Differentiating V ikS and combining it with (51) yields the following: According to Lemma 2, V ikS converges to zero within the time: Thus, e ikA + h ik (t) will converge to zero at T ikS , considering h ik (t) = 0 after t = T i . Therefore, the attitude tracking errors e iA = [e i1A , e i2A , e i3A ]T and e iΩ = [e i1Ω , e i2Ω , e i3Ω ] T of the i-th QR will finally converge to the origin within the time: It is obvious that the control law (44) is continuous and will not lead to chattering phenomena. Moreover, it is singularity-free due to the absence of negative fractional power in (44).
The proof is complete.

Remark 3.
Under the proposed control law (44), the convergence time of the QR's attitude tracking error can be adjusted in advance by designing β i , k iS and h ik (t). However, the selection process lacks guidance and direction. For this purpose, the h ik (t) with the following form can be adopted: where ν ikm , m = 1, 2, 3 are parameters to be determined. To be more general, choose T ikS > T i , then k ikS can be computed for β i with a fixed value using k ikS = [

Experiment Results
In this section, comparative flight experiment data from a formation of five QRs is presented to validate the effectiveness of the proposed TVFC method. Each QR was equipped with a customized user-programmable MCU-based flight controller, which includes a main MCU for running control algorithms and a co-MCU for managing peripherals, thus freeing up the computing power of the main MCU. As a result, the inner loop was run at 400 Hz, while the outer loop was run at 20 Hz. The onboard sensors were mainly composed of a three-axis gyroscope, a three-axis accelerometer, a three-axis magnetometer, and a barometric pressure sensor. It is worth noting that the measured linear velocity was not used for flight control during the test. The formation platform employed a distributed RTK positioning system, which consisted of a ground-based reference station and mobile stations carried by the QRs. The reference station broadcasted the satellite observation data via a wireless module to create an RTK environment, while the airborne mobile stations provided centimeter-level positioning accuracy for each QR. The communication framework of the QRs was established through a duplex wireless module, with each QR broadcasting its flight status and picking up the status of neighbor QRs to complete the formation flight. By adjusting the reception address of the data packages, the topology structure of QR formation could be modified, which enabled topology switching. Finally, the status of all QRs was picked up by the ground station for monitoring. All QRs were equipped with high-brightness LED labels to increase visibility, and they also came with a micro SD card for the recording of key flight parameters. The recording frequency used was R F = 10 Hz. The detailed hardware architecture and data flow can be seen in Figure 3.
All of the possible graphs for G S(t) are depicted in Figure 4, which contains five networks with different structures satisfying Assumption 1. The physical parameters of the QRs are mass, m i = 0.65 (kg); wheelbase, 270 mm; inertia matrix, J i = diag{0.02351, 0.02351, 0.04701}; and damping matrix, K it = diag{0.005, 0.005, 0.01} and K ir = diag{0.003, 0.003, 0.002}. The duration of the flight test was T t = 165 (s), with the leader's trajectory given as follows: with Υ i calculated as follows:   The initial conditions of the QRs were: The parameters of the controller were designed as follows: The experiment footage can be seen at https://v.youku.com/v_show/id_XNTk3NTI2 MDM1Ng==.html (accessed on 20 June 2023) or https://www.youtube.com/watch?v= 0Mk93U2-V9E (accessed on 20 June 2023). The footage demonstrates that the formation flight of the QRs is very stable and smooth. According to the on-site wind speed monitoring data, the recorded wind speed during the testing period was 1.8-2.3 (m/s) from the southwest, with gusts reaching up to 3.4 (m/s). The trajectories and position snap shots at t = 20, 50, 110, 165 (s) are illustrated in Figure 5. It can be seen that the QRs were able to successfully achieve and maintain the desired formation pattern Υ P and track the leader's trajectory P 0 . Figure 6 shows how the topology graph G S(t) was switched randomly every 5 s. The position tracking errors on the three axes are shown in Figure 7. One can see that under the proposed LVIPC and with the help of the RTK system, the peak value of the position tracking error of each QR is less than 0.1 (m), and it remains within 0.05 (m) for most of the time. Figures 8 and 9 depict the estimated linear velocity and the corresponding error with respect to the measured values, which show that the estimated value is close to the real value, thus verifying the effectiveness of the proposed linear-velocity observer. Figure 10 shows the measured acceleration signals of the QRs.   The attitude signals and tracking errors are shown in Figures 11 and 12. From the perspective of the attitude tracking error curve, the attitude tracking error of all QRs remains near zero, with the maximum amplitude not exceeding 2 degrees. This indicates that the performance of the designed NTSMAC is quite good. The measured angular velocities can be seen in Figure 13, and the estimated upper bounds of the lumped uncertainties are shown in Figure 14. It can be seen that all estimates are bounded. The curves of |d i1 | and |d i2 | rise in the middle section, which is due to the short-term increase in the wind force at that moment.
To further verify the performance of NTSMAC, we introduced two practical attitude control algorithms based on the same set of parameters for LVIPC-namely the classical cascade PID (CPID) [64] and the active disturbance rejection control (ADRC) [65]-as comparative baselines. The parameters used by both algorithms were well tuned to achieve relatively good tracking performance, as shown in Tables 1 and 2.     Figure 14. Estimation of lumped uncertainties' upper bound.  Due to the adoption of the same control parameters, the attitude tracking performance of each QR was relatively consistent. To save space, we chose QR1 as an example in Figure 15 to show the attitude tracking error of the QR under the control of CPID, ADRC, and NTSMAC. It is more or less apparent in the figure that the attitude tracking error of NTSMAC is relatively small as compared to the three methods. In order to evaluate the performance of the NTSMAC more quantitatively and intuitively, we adopted two commonly used error measurement indicators, which are the root mean square error (RMSE) and the maximum error (MAXE). The definitions of these indicators for the i-th QR are given as follows: where k = 1, 2, 3 is the index of the attitude channels, N 0 = T t R F is the amount of the recorded data samples, with j = 1, 2, · · · , N 0 .  Table 3 presents the comparison results of MAXE and RMSE for all five QR members across three attitude channels. It is clear that the MAXE and RMSE of the proposed NTSMAC are the smallest in the presence of wind disturbance from among the three methods, while the performance of CPID is the worst. Thus, the proposed NTSMAC greatly improves the attitude tracking performance, which provides the crucial assurance needed for precise position control.

Conclusions
In this paper, a practical TVFC method for QRs subjected to disturbances, uncertainties, and switching directed topologies was investigated. A fully distributed formation control scheme was proposed, which comprised LVIPC and NTSMAC. In LVIPC, the distributed observer was adopted to eliminate the measurement of linear-velocity states as only the local neighbor's states were needed to realize formation flight. In NTSMAC, a novel time-varying nonsingular terminal sliding mode manifold was designed to suppress the reaching phase and ensure the finite-time convergence. Furthermore, adaptive estimators were employed to remove the reliance on the prior knowledge of the upper bound of lumped uncertainties. The effectiveness of the proposed TVFC was proven through the Lyapunov theory, and the comparative outdoor flight experiment based on practical hardware further illustrated the good performance of the proposed TVFC method. Future work may bring in the collision avoidance mechanism to enhance flight safety.

Data Availability Statement:
The data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest:
The authors declare no conflict of interest.