Energy-efficient Post-failure Reconfiguration of Swarms of Unmanned Aerial Vehicles

In this paper, the reconfiguration of swarms of unmanned aerial vehicles after simultaneous failures of multiple nodes is considered. The objectives of the post-failure reconfiguration are to provide collision avoidance and smooth energy-efficient movement. To incorporate such a mechanism, three different failure recovery algorithms are proposed namely thin-plate spline, distance- and time-optimal algorithms. These methods are tested on six swarms, with two variations on failing nodes for each swarm. Simulation results of reconfiguration show that the execution of such algorithms maintains the desired formations with respect to avoiding collisions at run-time. Also, the results show the effectiveness concerning the distance travelled, kinetic energy, and energy efficiency. As expected, the distance-optimal algorithm gives the shortest movements, and the time-optimal algorithm gives the most energy-efficient movements. The thinplate spline is also found to be energy-efficient and has less computational cost than the other two proposed methods. Despite the suggested heuristics, these are combinatorial in nature and might be hard to use in practice. Furthermore, the use of the regularization parameter λ in thin-plate spline is also investigated, and it is found that too large values on λ can lead to incorrect locations, including multiple nodes on the same location. In fact, it is found that using λ = 0 worked well in all cases.


I. INTRODUCTION
In swarm systems, reliability and safety are crucial properties that can be improved by fault diagnosis technologies [1]. When focusing on navigation in a swarm of unmanned aerial vehicles (UAVs), the main challenges revolve around formation control and collision avoidance [2]- [5]. In any system, three main types of problems can occur at run-time, namely faults, errors, and failures [6]. These problems are interrelated in such a way that faults are the primary cause where a problem originates, an error is the consequence of a fault or multiple faults, and a failure is the ultimate manifestation of a problem in operation. As a solution, a system needs to be made resilient by design, providing a high degree of reliability and availability at run-time. The to restore the formation as good as possible. During this type of partial failure within a swarm, the proposed failure recovery methods enable the system to continue functioning, preventing losses due to unexpected service unavailability or operation failures. This sequential process of deviation and recovery must be robust and reliable.
One of the main problems in distributed formation control of UAVs is to enable dynamic management of creation, maintenance, and termination of swarms. The control system should be robust and energy-efficient, being constantly aware of the formation of the swarm at mission time and able to perform reconfiguration in the case of failure of one or multiple nodes. In the considered scenario, when some UAVs in the swarm experience failures, the controller discards them from the swarm, changing the formation. The newly created formation is not necessarily efficient for the mission at hand, and, therefore, subsequent reconfiguration into a more efficient formation may be needed, taking into account the mission requirements. In this paper, a pre-specified initial formation for a swarm determines the disturbed formation immediately after a failure occurs on a number of UAVs. Three fail-safe reconfiguration schemes are proposed to map the disturbed formation due to the pre-specified formation that is inspired by the thin-plate spline (TPS), distance-and time-optimal (DOA, TOA) algorithms, based on which UAVs have been reconfigured. The movement to the positions is handled by the setpoint tracking controller, implemented using a linear quadratic regulator (LQR) with integral action. This architecture is capable of managing transmission/actuation failures in swarms of UAVs. Along with this reliable mechanism, the minimization of energy consumption of the whole swarm is considered in the sequential process of deviation and reconfiguration. Furthermore, it is assumed that the swarm can (if necessary) be moved away from the obstacles prior to the reconfigurations therefore considering static and dynamic obstacles are out of the scope of this work. The main contributions of this paper are summarized as follows: • Proposing a novel idea to reconfigure the formation of swarms of UAVs when simultaneous failures of multiple nodes have been diagnosed within a cluster, having the aim of formation control with collision avoidance. • Three different algorithms for reconfiguration of swarms, TPS, DOA, and TOA are studied, which can provide reliability and availability at run-time. All the considered algorithms take into account the movement of all UAVs at the same time. Standard tree search algorithms such as A* do the path planning for one node at a time [12]. • The proposed algorithms are tested on six different swarms having two different failure cases each, in a total of twelve cases. • Lastly, the performance of reconfigurations is compared on distance travelled, kinetic energy, and energy efficiency.
The rest of the paper is organized as follows. Section II covers the related work. In Section III, the development of the proposed failure recovery system is described. In Section IV, the techniques for energy-efficient post-failure reconfiguration of a swarm of UAVs are presented. In Sections V and VI, simulation set-up and results are elaborated respectively. Lastly, concluding remarks are presented in Section VII.

II. RELATED WORK
The fault diagnosis and fault-tolerant controls are important to ensure the reliability and safety of any swarm system. Qin et al. in [8] present an extensive survey of the faults and the fault diagnosis algorithms and also classifies them as per their specifications. Similarly, Yang et al. in [13] build upon the trends and methodologies of fault-tolerant cooperative control of multi-drone systems which, despite being more challenging, are more flexible than single-robot systems. Complementing this, in their attempts to solve a constrained optimization problem for fault-tolerant control of a quadrotor, Chamseddine et al. have implemented the differential flatness in [14]. A fault-tolerant algorithm using the A* pathfinding method for multi-robot coverage path planning is proposed by Sun et al. in [12]. Furthermore, Liu et al. in [15] consider a linear multi-drone system comprising of multiple leaders, which has the ability to tolerate actuator faults and deal with input saturation. For this purpose, the control algorithms have been designed, with a backstepping approach, using local information of neighbouring nodes within a time-varying formation. A method of fixed-wing UAV swarm formation control using waypoints based on distributed ad hoc networks is elaborated by Suo et al. in [16]. A hypothesis related to a distributed fault-tolerant mechanism using a policy-based election algorithm for an uncertain environment is addressed by Wang et al. in [17]. Another approach to fault-tolerant control has been discussed by Wang et al. in [18] in which a cooperative fault-tolerant control has been illustrated for linear leader-follower networks with switching directed graph as the interaction typology network applicable to all nodes. This network structure functioned efficiently in the presence of multiple heterogeneous actuator faults that included not only the actuator bias fault but also the partial loss of effectiveness fault. A fault-tolerant formation control approach for UAVs of leader-follower type is discussed by Yu et al. in [19] against the actuator faults of only followers based on finite-time adaptive techniques. Raja et al. in [20] present a fault-tolerance module for a leader-follower mechanism to handle the actuator fault of a leader. In this algorithm, a new leader is chosen by using the locations of the follower and failed leader. The distance between the failed leader and followers is calculated using Euclidean distance, and the follower with minimum distance from the faulty leader is selected as a new leader for a swarm. A similar failure recovery strategy based on the shortest path planning/replanning problem is proposed by Tahir et al. in [21] for rerouting UAVs, which is the prequel work of this study.

III. FAILURE RECOVERY SYSTEM
In most cases, single or multiple failure occurrences in a swarm introduce gaps, and it is desirable to reconfigure the swarm and fill the gaps as shown in Fig. 1. This process raises a formation construction problem [22] that is widely covered in the literature. The main novelty of this work is to propose the architecture for reconfiguration of the swarms in case of failure of multiple nodes simultaneously. Also, the objective is to keep a safe distance while manoeuvring. Furthermore, all the UAVs are considered to be identical. Hence, it is not required to re-establish initial neighbouring states among the swarm. In the reconfiguration process, two main questions need to be addressed: 1) What is the best shape of the reduced swarm? This procedure is defined as the mapping problem. 2) What is the optimal movement of each node from the initial to final formation?
Consider the reconfiguration of a swarm of UAVs from the initial to the final formation, as presented in Fig. 1. This process is divided into four stages. The predefined formation is given in the first stage. Failures occur by breaking the initial formation in the second stage, which is followed by the vacant positions in the third stage. Eventually, the remaining nodes reconfigure themselves in the original formation while minimizing the overall nodes' deviations. In order to solve the proposed problem, the whole system is divided into two subsystems dealing with (a) reconfiguration of UAVs, and (b) tracking control, as shown in Fig.  2. In a multi-drone swarm, each active (non-failed) node n ∈ {1, .., N } receives a reference command r n = r + ∆ n where r is the reference for the whole swarm and ∆ n is the offset for node n, which is needed to keep all the nodes apart. When failures occur, the reconfiguration algorithms update the constant offsets ∆ = ∆ 1 ∆ 2 ... ∆ N T . Hence, the formation is re-established as good as possible with the current number of active nodes. The post-failure reconfiguration for the UAVs is designed using three different algorithms TPS, DOA and TOA. In all cases, the reference commands r n are updated by updating the ∆ n s. Besides, the trajectory of each node is controlled by the LQR technique with integral action. Each method is described in the following sections. In [27], TPS is applied for reshaping the trajectories of the UAVs in a swarm formation due to obstacles. In this paper, TPS is used for reconfiguration of the UAVs in a swarm formation after simultaneous failures of multiple nodes.

IV. RECONFIGURATION OF UAVS
A spline is a function defined by polynomials in a piecewise manner. Spline curves are used for the approximation of complicated shapes via curve fitting due to their ease of use and non-complicated construction [26]. The algorithm is analyzed in 2D to make it simpler; consequently, two sets of correspondence data points, X = x i and V = v i where i = 1, 2, 3, ..., n are considered. Here, the locations of a point in the scene (desired formation) and the model (initial formation) are given by x i and v i respectively. A mapping function f (v i ) can be acquired while keeping the shape of the disturbed formation/function under consideration, by minimising the energy function The amount of formation disturbance is evaluated by the energy function E T P S . By minimizing the first error measurement term, data points of V are mapped as closely as possible to the data points of X. The second regularization term is a penalty on the smoothness of f , and it is in a general case needed to make the mapping unique. In this case, one can put λ = 0, and still get unique solutions, which also reduces the likelihood of a biased mapping f , see Fig. 9.
Once the desired mapping is obtained, the constant offsets ∆ are updated accordingly. For example, if node n is mapped to the location of node m then ∆ n = ∆ m . Each UAV in the model starts following the shortest path to reach its next position in the scene.

B. DISTANCE-AND TIME-OPTIMAL ALGORITHMS
The full failure of an engine of a node in the swarm of UAVs using leader-follower tightly coupled formation is considered in [21]. As a solution, a bottom-up reconfiguration is imposed to bypass the failed node in order to keep the formation intact. VOLUME 4, 2016 For this study, the proposed method in [21] is extended for the reconfiguration of a multi-drone system after simultaneous failures of multiple nodes. The following two alternative algorithms are used for reconfiguration of the swarms, which are based on a combinatorial search with some applicationdependent pruning heuristics.
Algorithm 1 Pseudocode for distance-optimal algorithm 1: Replace all the missing nodes m, starting with the node that has the lowest index, with an active node n, by testing all alternative nodes with index n > m, which has a direct line of sight to node m. 2). If this does not resolve it, then arbitrarily choose among the optimal ones the movement involving the node with the smallest index. 5: Update the constant offsets ∆ accordingly.
The first algorithm minimises the total travelling distance from initial (x q,i , y q,i ) to reconfigured (x q,r , y q,r ) positions where q is the index of a reconfigured node. The second algorithm minimises the maximal individual travelling distance Algorithm 1 is distance-optimal, as it directly chooses the movement with the least sum of the distances. Algorithm 2 is time-optimal under the assumptions that all the travelling take place in parallel, and a longer distance takes a longer time to travel than a shorter one. This means that the longest distance travelled is the limiting factor. Thus, choosing the movement with the smallest maximal individual distance is time-optimal. Both algorithms fill all the vacant places, starting with the lowest index, by moving UAVs with higher to lower indices. The algorithms fill the missing nodes one at a time, and never reconsider prior movements, therefore they will eventually converge, filling the first N vacant places of the swarm formation. Collisions are avoided due to the following two features of the algorithms: a) All the movements of nodes are done with a direct line of sight, meaning that the moving nodes are not colliding with the non-moving ones. b) If two separate movements would have crossing paths, they would neither be distance-nor time-optimal. Thus, distance-or time-optimally moved nodes are not colliding with each other.

V. SIMULATION SET-UP
The dynamics of each node in the swarm formation are based on the model of a quadcopter, i.e. a UAV that has four propellers with fixed pitch mechanically movable blades as shown in Fig. 3 where θ, ϕ, and ψ are defined as pitch, roll, and yaw respectively. The major forces acting on the quadcopter are the gravity g and the thrust T i , i ∈ {1, 2, 3, 4}, of the propellers. In this model, the inertial reference is the earth shown as (x, y, z) that is the origin of the reference frame. The UAV is assumed to be a rigid body that has the constant mass symmetrically distributed with respect to the planes (x, y), (y, z), and (x, z). The orientation of a quadcopter reference frame (x, y, z) with respect to an inertial frame (x, y, z) 0 can be expressed mathematically in a state variable form [28]- [30], where translational and angular accelerations are given bẏ and respectively. The thrust produced by each propeller T i is translated into a total thrust T and the reactive torques M i , i ∈ {x, y, z}, which are affecting the rotations about the corresponding axis. The J i , i ∈ {x, y, z}, is known as the moment of inertia along the corresponding axis, and J mp is the moment of inertia of a motor with propeller. The angular velocities of propellers are assumed to be proportional to thrusts of propellers, i.e.
Similarly, the reactive moments of propellers are assumed to be proportional to the thrust of propellers, i.e.
The velocities corresponding to Equation (4) and section V arė andθ = w y cos ϕ − w z sin φ ϕ = w x + w y sin ϕ tan θ + w z cos ϕ tan θ ψ = w y sin ϕ cos θ + w z cos ϕ cos θ respectively. The Equations (4)- (7) represent the complete nonlinear model of a quadcopter, composed of twelve states, four inputs, and twelve outputs. These equations are furthermore linearized, resulting iṅ which are used for controller designing. The system parameters are taken from [30] and illustrated in Table 1.

A. TRACKING CONTROL OF UAVS
The motion of each drone is controlled using a standard LQR with integral action [21], [31]- [34]. LQR is a method for the design of an optimal state feedback law based on a linear model, in this case Equation (8). Fig. 4 shows the control system of each node is based on the feedback law that consists of a sum of a proportional and integral term. Both contribute to generating the thrusts T and torques M i , i ∈ {x, y, z}.

FIGURE 4: Block diagram of LQR with integral action
The states that are relevant to control without offset from setpoints are collected in a vector y p = [x, y, z] T , and the final feedback law is where K i is the integral gain, r is the setpoints for y p , K p is the state feedback gain, and x s is the setpoints of the states x. The weight matrices Q and R are given in the Appendix. More details are provided in our earlier work [21], [31], [32].

VI. RESULTS
Autonomous UAVs act in pursuit of their agenda. The local assignments are evaluated even when serving the requests of other nodes. The requests can be refused in case of a weaker notion of autonomy [35]. In this paper, such type of system is protected against performance degradation beyond a point where a node effectively becomes useless. The proposed architecture in Fig. 2 consists of a base case in which reconfiguration requests are forwarded to the nodes of a swarm in order to restore the formation shape. Secondly, the nodes acknowledge the requests using local control units for smooth navigation. Hence, in this approach, each post-failure reconfiguration algorithm, i.e., TPS with λ = 0, DOA, and TOA as discussed in Sections III and IV, decide the reconfiguration of the UAVs for each vacant pose within a swarm, and an associated LQR with integral action is subjected to track it. Each node is simulated using the nonlinear model equations of a quadcopter, described in Section V. Six different swarms of UAVs are considered. The number of UAVs in each swarm and the two different failure cases are listed in Table 2. The system is simulated in Simulink ® with default parameters under MATLAB 2018b, and the results are shown in Fig. 5, 6, and 7. The red, blue, and green markers represent the fully failed, active, and reconfigured nodes respectively. To restore the initial formation as good as VOLUME 4, 2016 possible, exact coordinates of the active nodes are obtained and all the possible combinations for reconfiguration are examined, and the decision is made accordingly. For all the reformed movements, the Euclidean distance is calculated and presented in Tables 3-5 where t is time, and D C (p, q) is the minimum distance that should be greater than 2r d between nodes p and q to avoid collisions, as r d is the radius of a UAV. Moreover, the total kinetic energy describes how much work is conserved in the process of the swarm movement. The performance of the swarm to redirect its manoeuvres in terms of total energy consumption E = n q=1 t f ti (P total − P hover )dt (12) is calculated where t i is the initial time and t f is the time where reconfiguration ends. This power is needed to generate thrust and the force of the thrust can be related in a non-linear way. Generally, P 2 ∝ T 3 where P and T are defined as power and thrust respectively. Furthermore, all the obtained performance results are elaborated in Table 6. For comparison of the methods M = {T P S, DOA, T OA}, and are defined as performance indices for collision avoidance, distance travelled, and energy efficiency respectively. The obtained results are depicted in Fig. 8. For both failure cases 1 and 2, it is evident from the results that all the algorithms work well for the post-failure reconfiguration of UAVs. Both TPS and TOA techniques fulfil the collision avoidance constraint by maintaining better separations from the respective nodes in comparison to DOA. Secondly, the amount of total distance travelled is minimum using DOA as opposed to TPS 6 VOLUME 4, 2016 This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and with different weights of λ on both failure cases 1 and 2.
For example, in the failure case 2, possible collision is seen for the reconfiguration of the swarm 1 with λ > 0.4062, see Fig. 9. In all cases, there is an upper limit on λ, after which the TPS gives incorrect reconfiguration coordinates or results in collisions. The borderline values of λ are reported in Table  7. As can be seen, smaller values on λ are required in the second failure cases that are more challenging for TPS to handle. It seems that the behaviour of TPS reconfiguration is sometimes unpredictable as mentioned in [36].

VII. CONCLUSION
In this paper, the failure recovery architecture that considers the simultaneous failures of multiple nodes is proposed. This architecture is divided into two subsystems; post-failure reconfiguration of UAVs and their control, having the overall purpose of formation maintenance with collision avoidance. For the evaluation of the reconfiguration mechanism, three different algorithms comprising of TPS, DOA, and TOA are presented. These methods are tested on six different swarms having two different failure cases each, in a total of twelve cases, which have a different number of failing nodes. For the tracking control of each node, LQR with an integral action technique is used. The different reconfiguration algorithms are compared on collision avoidance, total distance travelled, kinetic energy, and energy efficiency. It is evident from the results that for both failure cases 1 and 2, all three algorithms i.e., TPS with λ = 0, DOA, and TOA are effective and work well for the post-failure reconfiguration of UAVs. The UAVs are dynamically and reliably reconfigured as fast as possible 8 VOLUME 4, 2016 This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication.  without collisions and maintaining the desired formation. Furthermore, another important contribution is the tradeoff between the total distance travelled by the swarms and their corresponding energy efficiency. From the performance indices for the swarm reconfiguration, as can be expected, it is clear that the DOA is most efficient when it comes to travelled distance. On the other hand, TPS and TOA perform clearly better than DOA when it comes to collision margins and energy efficiency. There is a minor difference between the results of TPS and TOA, but one can say that TOA is slightly more energy efficient than TPS. Despite the suggested heuristics, DOA and TOA are combinatorial in nature and might be hard to use in practice. The performance of the TPS is quite well and can be considered for the reconfiguration of swarms. Furthermore, it was also found that the use of too large regularization parameter λ will result in the mapping of nodes to incorrect locations, including multiple nodes on the same location (i.e. collisions), which is of course not desired. In fact, it is found that the use of λ = 0 worked in all tests, so this can be recommended.   • is an active node, and • is position after reconfiguration.
The omitted axis labels are x (m) horizontally, and y (m) vertically.