A Decentralized Low-Chattering Sliding Mode Formation Flight Controller for a Swarm of UAVs

In this paper, a nonlinear robust formation flight controller for a swarm of unmanned aerial vehicles (UAVs) is presented. It is based on the virtual leader approach and is capable of achieving and maintaining a formation with time-varying shape. By using a decentralized architecture, the local controller in each UAV uses information only from the UAV itself, its neighbors, and from the virtual leader. Also, a synchronization control objective provides a mechanism to weight between the fleet achieving the desired formation shape, that is, achieving the desired relative position between the UAVs, and each UAV achieving its desired absolute position. The use of a combination of a sliding mode controller and a low pass filter reduces the usual chattering effect, providing a smooth control signal while maintaining robustness. Simulation results show the effectiveness of the proposed decentralized controller.


Introduction
The use of an unmanned aerial vehicle (UAV) swarm brings several advantages in search and rescue, disaster monitoring, aerial mapping, traffic monitoring, reconnaissance missions, and surveillance [1][2][3]. A swarm of UAVs provides system redundancy, reconfiguration ability, and structure flexibility, being more effective, flexible, robust, and reliable than single vehicles [4,5]. The formation control is a critical task of attempting cooperation among UAVs. In general, a formation control problem is to find a coordination scheme to enable UAVs to reach and maintain some desired, possibly time-varying formation or group configuration [6].
In the view of communication networks, the existing formation control approaches can be classified into the centralized method, where a single controller is used to control the whole team based on the information from the whole team [7] and the decentralized method, where each team member generates its own control based on local information from its neighbors [1,2,4,[8][9][10][11]. Centralized formation control can be a good strategy for a small team of UAVs. When considering a team with a large number of UAVs, the need for greater computational capacity and a large communication bandwidth would mandate a decentralized formation control [4].
The main structures considered for formation control of UAVs swarm are leader-follower, behavioral, and virtual structure/virtual leader [12,13]. In the leader-follower approach [3,6,10,14], a common leader is chosen and the rest of the agents are assigned as followers. The group leader broadcasts its position information to the followers who then begin to follow the leader at an offset. In the behavioral approach [15,16], several desired behaviors are prescribed for agents in this approach. Such desired behaviors may include cohesion, collision avoidance, obstacle avoidance. In the virtual UAV is subject to unknown bounded disturbance. The computation of higher-order derivatives is not required. This is achieved by decomposing the control signal in smooth and in chattering components and filtering only the chattering component. Compared with Reference [24], which considers a single space vehicle, the proposed controller considers a synchronized and decentralized formation of multiple UAVs. In a synchronized formation, multiple UAVs simultaneously converge to desired positions. In comparison with Reference [23], which uses LPF SMC for synchronized position control for multiple robotic manipulator systems in a ring-link communication topology, the proposed controller not require computation of higher-order derivatives, a more general information exchange topology is adopted, and the problem of UAV formation flying is considered. Different from our previous work [18], the proposed controller uses an LPF for chattering attenuation. The finite-time convergence to a linear sliding surface is proven by introduction of an appropriated Lyapunov function candidate and simulation results show the effectiveness of the proposed control architecture.
To use the LPF-based SMC, the upper bound of the disturbance must be known. Most of this disturbance is better described in the wind frame of the aircraft. For example, a model uncertainty can affect the lift force computation. The difference between the true and computed lift forces is equivalent to a disturbance force applied in the lift direction. Similar discussion can be made of the thrust, drag and side forces. If the NLDI linearizes the system in the leader's wind frame [8,14,17,18], this upper bound can be used directly, under the assumption that the leader's wind frame is similar enough to the followers' wind frames, as the fleet in formation flies approximated to the same direction. If, however, the NLDI linearizes the system in a global frame [9,10], the wind-frame-described upper bound must be translated to the global frame. The equations to translate the disturbance upper bound to the global frame are developed in this paper.
The main contribution is now summarized. A formation flight controller is developed that includes, in a single controller, the following characteristics: • uses the robust sliding mode control technique [8,11,18,19]; • has low-chattering with low degradation in performance by the use of a low-pass filter modelled as a plant component [23][24][25][26]; • uses a variant of the LPF SMC that is mathematically and computationally simpler than the usual approach, and removes computation of higher-order derivatives [24]; • is a multi-agent decentralized/synchronous approach [18,23].
It is worth noting that each individual characteristic of the controller listed above has already been developed in other papers but, to the best knowledge of the authors, there is no controller that includes all characteristics in a single controller. It is also worth noting that, to include all characteristics in a single controller, an appropriate Lyapunov that unifies theses characteristics is developed.
As a second contribution, a set of equations that translate the disturbance upper bound and is derivative upper bound from the wind frame to the global frame is proposed. These equations are used in the proposed LPF-SMC, but can be used, with minor modifications, in most fixed-wing formation SMC or SOSMC that are described in a global frame.
The remainder of this paper is organized as follows. Section 2 defines the problem, presents the mathematical models for the UAVs, formation flight, and communication graph. Section 3 presents the proposed controller, equations to compute the disturbance's upper bound, and proves the stability of the controller. Section 4 evaluates the proposed controller by simulation against an unfiltered SMC, where it is shown that the controller significantly reduces its chattering without significantly reducing its performance, and Section 5 concludes this paper.

Preliminaries
In this section, models for an individual UAV and for a fleet formation are presented.

UAV Model
The dynamics relating the input and output of the i-th vehicle in a fleet of n UAVs can be described by using the so-called point-mass aircraft model. It assumes a non-rotating flat Earth with a constant gravitational acceleration g. This model provides adequate precision to aircraft guidance and control problems and for short-range trajectory planning. It also assumes that the intensity of the wind is mild such that the airflow can be considered aligned with the vehicle fuselage, that is, that the angle-of-attack and sideslip angle are null, which are reasonable suppositions to cruise flight and coordinate maneuvers. Under these assumptions, as depicted in Figure 1, the drag force D i (t), generated by the airflow, is aligned to the fuselage, pointing backward, whereas the lift force L i (t) is perpendicular to the fuselage. It is assumed that the propulsive system provides a thrust force vector T i (t) aligned with the fuselage/airflow and in the opposite direction to D i (t) and that the net angular momentum generated by the propulsive system is null. Finally, it is assumed that the vehicle mass m i is (approximately) constant, i.e., the propulsive system is electric or if fuel-based, that the consumption is small compared to the total vehicle mass. These simplified suppositions are commonly used in the literature [9,10,27,28]. To achieve extra precision in more aggressive maneuvers, the effect of the angle-of-attack and sideslip angle should be included in the model [14]. In general, these quantities require a dedicated sensory system-which is usually not present in small UAVs-to these angles be measured. In this work, the angle-of-attack and sideslip angle are allowed to be unmeasured but it is supposed that their effect can be incorporated in the model as a bounded disturbance b i (t).
The state vector of the point-mass model of the i-th UAV is composed of its position vector p i (t) = [ p xi (t) p yi (t) p zi (t) ] T described in the inertial Cartesian reference frame NED (North-East-Down) and by its velocity, described in a spherical coordinate system composed by the ground speed V i (t), flight path angle γ i (t) and course angle χ i (t). By rotating the reference frame first by χ i (t) around the z axis and after by γ i (t) around the rotated y axis, the i-th aircraft wind frame is obtained. Since it is assumed that the aircraft velocity vector is aligned with its fuselage, χ i (t) and γ i (t) are equivalent respectively to the yaw ψ i (t) and pitch θ i (t) attitude angles. The point-mass model includes also the roll attitude angle φ i (t), which is a rotation of the fuselage around the direction of the velocity vector. The definition of the roll, pitch and yaw angles can be seen in [29]. Figure 1 shows the i-th UAV and its vectors and attitude angles. The state change given by the derivative of p i (t) is computed aṡ where is a rotation matrix that rotates from the wind frame to the reference frame with angular velocity and the variables V i (t), χ i (t), and γ i (t) can be computed by The UAV dynamics is described by [9] parameter uncertainty, and disturbances in acceleration, generated by several sources, such as wind. It is supposed that b i (t) andḃ i (t) are unknown but with known bounds. The subscripts t, θ, and ψ from the elements of b i (t) means respectively thrust, pitch, and yaw. The thrust force magnitude T i is a function of the engine throttle; D i (t) is the magnitude of the drag force; the lift force magnitude L i is a function of several parameters, such as air density and aircraft speed, and is adjusted mainly by changing the elevator position and φ i is adjusted by a combination of aileron and rudder positions. The variables T i (t), L i (t), and φ i (t) are the control inputs at the i-th UAV. It can be seen that Equation (5) presents a singularity when V i (t) = 0. Fixed-wing vehicles must maintain non-null airspeed to maintain its lift. Assuming null or mild wind speed, the ground speed V i (t) is also non-null and this singularity does not occur. It can be seen that cos γ i (t) = 0 also presents a singularity in Equation (5). This occurs only when the UAV is flying exactly in an up or down direction. However, this is not an achieved state, except in highly acrobatic vehicles. By defining the load factor n i (t) as [28] n i (t) and defining the following virtual control input the dynamics Equation (5) can be rewritten aṡ By derivingṗ i (t) from Equation (1), and applying some manipulations, is obtained thaẗ where g = [ 0 0 g ] T is the gravitational acceleration vector. By defining the dynamics are finally rewritten asp where τ i (t) ∈ R 3 is a virtual controller input and d i (t) ∈ R 3 is the virtual disturbance described in the reference frame. For the controller design, the model given by Equation (12) will be used. Once the virtual control signals are known, the original variables can be obtained. Since for any rotation matrix, and then T i (t), n i (t), φ i (t) can be obtained from Equation (7), which can finally be used as the input of an inner loop controller that actuates over the engine and control surfaces [8].

UAV Formation
It is considered a formation of UAVs with a virtual leader scheme. The virtual leader is designated here as the 0-th UAV, and consists of a virtual point with a position p 0 (t) = [ p x0 (t) p y0 (t) p z0 (t) ] T in space, known by all UAVs, which describes a smooth trajectory as a function of time. The results of this work can also be used for a non-virtual leader configuration by assuming that the leader UAV can broadcast its position to all followers UAVs.
The fleet formation is planned by the generation of the desired position p d T for the i-th UAV which is described as wherep i (t) = [p xi (t)p yi (t)p zi (t) ] T is the desired (time-varying) clearance, which is described in the reference frame.
To achieve a formation shape that rotates with the leader is interesting to describe the desired clearancep i (t) in the leader's wind frame or any other frame related to the leader as wherep r i (t) is the clearance vector described in a leader's frame, such as wind, and the formation rotation matrix R r (t) rotates from the leader's frame to the reference frame. For example, by defining R r (t) = R 0 (t) (see Equation (2) with i = 0), it is achieved formation description aligned with the (virtual) leader's trajectory as in, for example, Reference [8,9]. If, instead, R r (t) is defined as it is achieved a formation description aligned with the horizontal projection of the (virtual) leader's trajectory, used in, for example, References [14,17]. Another option is to describe the formation using a leader's frame defined by the attitude Euler angles yaw ψ 0 (t), pitch θ 0 (t), and roll φ 0 (t). This can be useful, for example, for maneuvers involving close interaction between the leader and the followers, such as to a boom-receptacle automatic aerial refueling. In this case, The derivatives of p d i (t) in Equation (14) can be computed aṡ Using the Theorem of Coriolis [29], the derivatives ofp i (t) in Equation (15) can be computed aṡp where ω r (t) is the angular velocity between the rotating leader's frame and the reference frame and is given by It is worth noting that when using the non-virtual leader's body frame, the angular velocity ω r (t) is the body angular velocity, which can be directly measured by a gyro sensor at the leader. By using a non-virtual leader and any of the wind frame variants, the ground velocity obtained from a GPS sensor or from a navigation algorithm must be used. When using a virtual leader approach, its trajectory is smooth, pre-known, and artificially generated, in a way that ω r (t) can be pre-computed analytically or numerically with arbitrary precision depending on how the trajectory is created.

Communication Graph
Each follower UAV can exchange data with their neighbors. The communication network is represented by an undirected graph, which means that, if an i-th UAV receives data from a j-th UAV, this means that the j-th UAV receives data from the i-th UAV. The set of the UAVs that are neighbors of the i-th UAV is defined as N i .
The Laplacian matrix L represents the connectivity between the UAVs where a ij = 0 means that there is no communication between the i-th and j-th UAVs and a ij > 0 means that there is a communication link between the i-th and j-th UAVs, and the value of a ij is used as a weight to the control algorithm that is developed in this paper. If all UAVs are reachable, that is, if someone starts from any UAV and can achieve any-other UAV via the communication links, L is semidefinite positive. In decentralized controllers, the weight that is given to the information present in the own i-th UAV is also described, which is given by the diagonal matrix Λ. The matrix H includes both the own weight and the neighborhood weight. These matrices are given by Note that since λ 1 , . . . , λ n > 0 and L is semidefinite positive, the matrix H is invertible.

Formation Tracking and Synchronization Errors
The tracking error of each aircraft e i (t) = [ e xi (t) e yi (t) e zi (t) ] T ∈ R 3 , relative to a desired position in the reference frame, is defined as The synchronization error ∆e ij (t) = [ ∆e xij (t) ∆e yij (t) ∆e zij (t) ] T ∈ R 3 , which can be seen as a relative position error between the UAVs, is defined as It can be seen that ∆e ij (t) can be computed without knowing the leader's position. However, since the computation ofp i (t) andp j (t) in Equation (15) can be chosen to be dependent on the leader's flight direction or attitude angles, it is assumed here that the leader's data is available to all UAVs.
It is assumed that each i-th UAV can communicate only with a correspondent set of neighbor UAVs, N i ⊂ {1, 2, . . . , n}. The communication graph is assumed to be undirected, connected, not change with time, and previously known. Each UAV receives the tracking error information of other UAVs in the fleet only through its neighbors (as, for example, in the simulation in Section 4). The virtual leader can be seen as an extra node in the graph, that connects to every other UAV in a directed way, from leader to each follower.
The coupled error at i-th UAV is defined as the weighted sum of its tracking error and the synchronization error with respect to its neighbors, that is, in which λ i > 0 weights its own tracking error and a ij > 0 weights the error difference between the neighbor UAV j of the UAV i. In the last equality in Equation (28), if j / ∈ N i then a ij = 0. The synchronization control objective is to make the coupled errors approach to zero.

A Componentwise Formation Description
It is supposed that each component of d i (t) is independent of each other which implies that each component ofp i (t) is independent of each other. In this way, the controller design is simplified since the description of only one axis is sufficient. A controller policy can be developed to a single axis and then it can be directly applied to the other two.
The one-dimensional dynamics from axis l = x, y, z, of the reference frame, is obtained from Equation (12) asp Accordingly, the coupled tracking-synchronization error is obtained from Equation (28)

Proposed Controller
Here, a synchronous sliding mode controller is proposed. Figure 2 shows the proposed control structure. It achieves robustness against model uncertainty and disturbance. The chattering is attenuated by the use of a low pass filter (LPF). To achieve synchronization, each UAV uses tracking errors of its neighbors to compute a sliding surface in the coupled error space. The sliding surface at the i-th UAV for the l axis is defined as As usual for sliding mode controllers, it is shown in the next subsection that s li (t) converges to zero in finite time, and maintains equal to zero thereafter. On the sliding surface, that is, when s li (t) = 0, the coupled error behaves according to the linear system e c li (t) + k dė c li (t) + k p e c li (t) = 0, which has all poles in the left plane and, thereafter, is exponentially asymptotically stable for project parameters k d , k p > 0. The proposed control law for i-th UAV is where τ s li (t) and τ f li (t) are, respectively, a smooth signal and a filtered signal of the control law, computed by Equation (35) defines a low pass filter with cutoff frequency ξ i > 0 that converts a chattering signal u li (t) to a smooth signal τ f li (t). The parameter η must be chosen by the designer to guarantee the stability of the overall system.
The proposed control law given by Equations (33)-(36) contains only information from the virtual leader (or from a broadcasting non-virtual leader), from the own i-th UAV, and from its neighborhood N i . The neighborhood information is contained in s li (t), defined in Equation (31), which is a function of e c li (t) from Equation (30), which is a function of the own local error e li (t) and the neighborhood errors e lj (t), j ∈ N i . Remark 1. The variables k p and k d define the natural frequency and damping factor of the 2nd order local sliding surface s li of the i-th UAV from Equation (31). As can be seen in [20], these gains also define a control bandwidth, which must be sufficiently small to account for, for example, to actuator dynamics. Since it is chosen the same gain k p and the same gain k d to all UAVs, it means that they have sliding surfaces that share the same control bandwidth. This is reasonable if all UAVs have similar physical, actuator, and aerodynamic characteristics. However, if there are distinct UAVs, the constants must be chosen to respect the control bandwidth of the UAV with the slowest dynamics.

Disturbance Model
Measurement or computation errors and the effect of non-modeled dynamics are incorporated in the dynamics model, given by Equation (12), as a disturbance signal described in the reference frame, It is supposed that the controller has no access to d i but there are known upper bounds ∆ xi , ∆ yi and ∆ zi on the magnitude of the components of d i and upper bounds∆ xi ,∆ yi , and∆ zi on the derivatives of the components of d i , that is, These upper bounds are used to define the value of η in Equation (36), as explained in Section 3.2. As a contribution of this paper is shown that the upper bounds on the components in the reference frame coordinates can be computed from the upper bounds δ ti , δ θi , and δ ψi on the components of the disturbance signal in the wind frame b i (t), and from the upper boundsδ ti ,δ θi andδ ψi for the The wind frame components of the disturbances are more naturally obtained, for example, in description of imprecision in the computation of drag or thrust forces. Assume that there is an upper bound Ω i for the i-th UAV angular velocity ω i and define the bounds vectors δ i [ δ ti δ θi δ ψi ] T andδ i [δ tiδθiδψi ] T . From Equation (11), it can be seen that The upper bounds of each component of d i are Since Equation (11) involves two frames in which one rotates related to the other, its derivative is obtained by using the Theorem of Coriolis [29] whereḋ i (t) contains two components. The first,ḃ i (t), is the derivative of the disturbance b i (t), as seen by the wind frame. The second, ω i (t) × b i (t), is generated by the rotation of the wind frame related to the inertial frame. See that a constant disturbance in the wind frame is a varying disturbance in the inertial frame, because of its rotation. Finally, R i (t) is used to represent the sum of these components in the inertial frame. For the bounds δ i ,δ i , and Ω i , it is obtained In this way, Equations (40) and (44) provide the upper bounds to the proposed controller.

Stability Proof
To analyze the overall fleet behavior, all local variables must be concatenated in vectors. Concatenating the positions p i , virtual control inputs τ i (t), and disturbances d i (t) from all UAVs of the fleet results in respectively T , all R 3n vectors. In this way, the dynamics of the fleet of UAVs is given by concatenating Equation (29) Similarly, the error and coupled error in x axis are R n vectors given by where ⊗ denotes the Kronecker product and matrix H is given by Equation (24). The concatenation of the n UAVs sliding surfaces S(t) = [ s T 1 (t) . . . s T n (t) ] T is obtained as The proposed sliding mode control law is written as where τ s (t) and τ f (t) are computed by with To analyze the fleet stability, the following Lyapunov functional candidate is proposed Note that, since H and H ⊗ I 3 are a positive definite matrix, H −1 and (H ⊗ I 3 ) −1 are also a positive definite matrix, so V(t) is always positive for S(t) = 0.
By using Equations (45), (48) and (49), the sliding surface given by Equation (47) can be rewritten as Since (H ⊗ I 3 ) −1 is constant, the derivative of Equation (52) iṡ By deriving Equation (53) and after using Equation (50),V(t) is rewritten tȯ The upper bounds of the disturbance and its derivative are given, respectively, by ∆ li ≥ |d li (t)| and∆ li ≥ |ḋ li (t)|, which are computed by, respectively, Equations (41) and (44). It is shown in [24] that |τ f li (t)| ≤ |d li (t)| ≤ ∆ li . By using these upper bounds in Equation (55), it can be seen thaṫ By choosing η satisfying for some arbitrarily chosen constant > 0, it is obtaineḋ where S(t) 1 is the 1-norm of S(t). Using the fact that the 1-norm is greater than the Euclidean norm of the same vector, thenV (t) ≤ − S(t) , which means that V(t) and, therefore, S(t) go to zero in finite time [20]. On the sliding surface, the system behaves as a stable linear system given by Equation (32) and the error converges asymptotically to zero.

Remark 2.
Note that the sliding surface given by Equation (47), when rewritten in Equation (53), is a function only of the disturbance D(t) and the output of the filter τ f (t). This has two main implications:

1.
Since it is shown here that S(t) → 0, it follows that τ f (t) → −D(t). In this way, τ f (t) estimates and compensates disturbances. Since the effect of airflow is not aligned to the fuselage is a disturbance, the presence of a disturbance compensation shows that the wind effect can be neglected in the initial model if this effect has known bounds.

2.
If the disturbance is null at t = 0, S(0) = 0 if τ f (0) = 0 and the system already starts in sliding condition. Similarly, if the known disturbance upper bound is relatively small, the system starts near the sliding surface and converges fast to the sliding surface.

Simulation
In this section, a simulation is made to show the effectiveness of the proposed controller. A scenario of 5 UAVs with communication links described by Figure 3 is used. The matrices and Λ = I 5 are chosen to give the same weight for the UAV own error and for each of its relative errors. The choice k p = 0.5 and k d = 0.0625 provide a critically damped sliding surface with natural frequency ω n = 0.25 rad/s. These gains are chosen relatively small, as a way to limit the maximum commanded acceleration, even if the UAVs are initially far from their desired position. The low pass filters are settled such that Ξ = I 5 ⊗ I 3 .
A fleet with a non-rectilinear 3D trajectory is described, which is defined by the virtual leader path given by For easy visualization, a time-varying formation is considered, whose horizontal projection in the reference frame has a V-shape and the altitude has time-varying oscillation. Accordingly, the formation rotation matrix R r is defined as R χ from Equation (16) The initial position of each UAV is defined as The initial velocity of each UAV is defined aṡ  (44), resulting iñ ∆ xi =∆ yi =∆ zi = 0.23. By choosing = 0.42, it is obtained from Equation (57) that η = 1.
The system is implemented using an ode4 Runge-Kutta solver, with a fixed-step size of 1 ms. Since it is impossible to perfectly simulate the effect of a chattering input signal in a continuous differential equation, the controller output is evaluated at 10 ms time steps and maintained constant between time intervals.
For comparison purposes, the unfiltered synchronous formation flight controller presented in Reference [18] is also simulated. It is configured to be as similar as possible to the proposed controller. The first order sliding surface is defined with the same natural frequency as the proposed controller, that is, ω n = 0.25 rad/s. By using the same upper bound ∆ xi = ∆ yi = ∆ zi = 0.35 and by choosing the same = 0.42, it is computed η = 0.77. Other parameters are exactly the same as the proposed controller. Figure 4 shows the desired trajectory for each UAV in black, and the trajectory achieved by each UAV in distinct colors. Square and '*' markers show respectively the desired and achieved positions in specific and equally spaced time instants. When a '*' is inside the square, the UAV is in its desired position.  Figure 5 shows the formation flight error components e xi , e yi , and e zi for each i-th UAV for both controllers. Figure 6, shows the coupled error of each i-th UAV, which is given by Equation (46) for both controllers. It can be seen that, for both controllers, the system rapidly enters in sliding mode, the coupled errors slide in the prescribed linear sliding surface and achieve the performance described by the linear system that defines the sliding surface. It can also be seen that the error converges to zero, which shows that both controllers completely compensate for the added input disturbance. Figure 7 shows the controller output τ xi , τ yi , and τ zi for each i-th UAV, which is generated by adding the smooth τ s i control signal and τ f i , obtained by filtering the chattering signal U i in the proposed controller, or is the unfiltered control signal in the controller from Reference [18]. As can be seen, the proposed control output is smooth, whereas the control output from the unfiltered SMC chatters.

Conclusions
A decentralized architecture for synchronous formation flight of UAVs based on sliding mode control with a low pass filter was proposed. The use of the SMC technique provides robustness to disturbances, in a way that the system slides in the prescribed sliding surface even in the presence of disturbances. The LPF virtually removes the chattering while maintaining the convergence to a null error in steady-state. In the proposed architecture only the chattering component of the control signal is filtered. As a result, the controller has a simpler expression when compared to recent results of the literature, such as in [23]. Also, it is presented an equation that is used to compute the upper bounds in the disturbance and in its derivative to a formation described in a global frame. This equation assumes that the upper bounds are known in the wind frame of each follower UAV. It is proved that the proposed controller is stable, achieving a prescribed sliding surface in finite time.
For future work, more realistic models for UAV and wind gusts can be implemented. Also, it is desired to implement other SOSMC, such as presented in References [21,22], in the context of the synchronous formation flight.