Research

. The purpose of this study is to oﬀer an adaptive hybrid controller for the formation control of multiple unmanned aerial vehicles (UAVs) leader-follower conﬁgurations with communication delay. Although numerous studies about the control of the formation exist, very few incorporate the delay in their model and are adaptive as well. The motivation behind this article is to bridge that gap. The strategy consists of an adaptive fuzzy logic controller and a Proportional, Integral, and Derivative (PID) controller where the logic controller ﬁnes/tunes the PID controller gains. The controller also consists of an integrator that raises the order of the system which helps reduce the noise and steady-state errors. The simulations conﬁrm that the proposed technique is robust and satisﬁes mission requirements. Moreover, the ﬂying formations of the swarm were created by a B-spline curve based on a simple waypoint. The main contribution of this study is to present a model where the formation remains stable during the whole ﬂight, errors are within the optimal range, and the time delays are manageable.


Introduction
Recently, control of multi-UAV formation has become one of the challenging research areas among multiple UAV research issues. is surge in research interest in formation control is because of the various improvements of such multi-UAV formations over a single UAV, including superior adaptability, flexibility to unfamiliar surroundings, and robustness. Formation control is described as the organization of a set of UAVs that keep a specific formation like in the shape of a triangle, square, and so on. Possible uses of formation control comprise various collective objectives like search and rescue, reconnaissance, transferring big objects, and control of arrays of satellites [1][2][3].
Researchers have proposed various formation configurations, along with multiple control tactics for formation control of multiple UAVs. e key strategies contain behavior-based strategy, the leader-follower method, and the virtual formation structure [4][5][6]. All different strategies have their specific pros and cons. For instance, we take the leader-follower strategy, where a single aircraft acts as the leader, while the rest of the aircraft follows the leader. e drawback of this strategy is that there is no instantaneous feedback between the leader and the followers [7].
Two researchers, Hu and Gang [8], proposed a strategy that can only work when the distance that separates the leader and the followers is known. However, one researcher applied another strategy and maintained the structure of the formation without the information of the dynamic model and velocity of the leader UAV [9]. In contrast, in the virtual formation structure, any UAV can become the virtual leader and the rest of the UAVs starts to follow the virtual leader [10].
Consider the behavior-based strategy where the weighted average of each aircraft and the chosen route control the movement of every UAV [11]. For the virtual formation, the formation configuration is considered a rigid body, and the dynamics of the virtual leader UAV guide every follower to maintain the fixed virtual configuration [12,13]. e drawback of the virtual formation is that its operation is more central; i.e., a single aircraft malfunction can disrupt the entire formation [14].
Many research studies that consider the formation control of multiple aircraft exist. e work in [15] discusses a vision-based approach to control a group of UAVs. e study in [16] offers a control architecture that combines the three approaches of the behavioral method, leader-follower method, and the virtual leader technique to organize them into a unified strategy. In [17], the authors introduce a group of finite-time consensus algorithms for the formation control of multiple UAVs. In another study [18], researchers study the problem of keeping the formation of a set of aircraft using only coarse information. When members of the formation communicate with one another, time delays are inevitable. ese delays can cause instability, fluctuation, and reduced efficiency. erefore, numerous researchers have examined the aforementioned issue in detail. For instance, in [19], researchers present a time-delayed linear system with directed graphs. e problem formation is transformed into a stability problem, and the effect of delayed communication is compensated in the control strategy. In [20], they design the formation controller based on the Lyapunov-Krasovskii approach to reduce the time delay and its impact. e contributions of this study are as follows: (i) One of the contributions of this study is designing an adaptive fuzzy logic controller for the formation control of multiple UAVs following a leader-follower configuration. (ii) Another major contribution is related to the communication delay and how few studies that incorporate the delay in their formation control model and are adaptive as well exist. is study intends to bridge that gap. (iii) e main contribution of this study is to verify using comprehensive simulations that by using the designed model, formation remains stable during the whole flight, errors are within the optimal range, and the time delays are manageable. e remainder of the paper is structured as follows: Section 2 tackles the latest trends in formation control. Section 3 discusses different structures and configurations for UAV formations. Section 4 presents the preliminaries of UAV formation and discusses the communication graph concept of UAVs. Section 5 deals with the design of the system control model. Section 6 designs the formation controller based on an adaptive hybrid control algorithm and also sets the controller parameters. Section 7 presents the system stability analysis. en, Section 8 presents the simulation results and their analysis. Finally, Section 9 concludes the whole study and discusses its future scope.

State of the Art
is section discusses the latest trends in the field of formation control and the impact of input delays. In [21], researchers try to maintain the formation of a high-order multi-UAVs system with model uncertainties, disturbances, and noises. ey propose a hybrid approach by combining the sliding mode method with the adaptive neural network technique. In [22], academics present a formation control strategy that avoids collision using deep reinforcement learning. Recent studies that examine the role of input delay in the formation control include [23]. It examines the time-dependent tracking of formation control with time delay and external noise.
is study uses Artstein's reduction method to eliminate the delayed interaction between UAVs. Another recent study [24] discussed the impact of time delay in the formation of underwater vehicles. It uses a gradient-descent technique to estimate the delay. en, it uses the Lyapunov function to reduce it to an optimal level.
In another recent study [25], the authors control the formation of multiple UAVs using a distributed backstepping control technique. e formation remains stable irrespective of communication delays between the UAVs. e researchers divided the designed model into linear and nonlinear loops for better control. In a different study [26], the researchers again utilize the back-stepping technique for controlling a swarm formation of UAVs in a specific circular route. e designed technique factor in the parameter and input constraints self-tunes itself adaptively. One more phenomenon that the researchers discuss in terms of formation control is event-triggered techniques. One study [27] designs a predictive model using the eventtriggered method for the control of multiple UAVs. In the proposed model, UAVs can only share information with their neighbors and the event trigger phenomenon helps lessen the computational stress on the algorithm. Another hybrid strategy in [28] is to control the formation of a swarm of multiple UAVs by improving the fitness function. e authors utilized particle swarm optimization (PSO) with Cauchy mutant (CM) operators. e operators help to enrich the PSO algorithm by inspecting the fitness level for the global solutions of UAV formation. e designed algorithm not only copes with the convergence issue but also fastens the speed.
In [29], a hierarchical structure based on multicolonies is designed.
ere are three nonoverlapping colonies that contain multiple UAVs and one UAV is nominated as a leader in each colony. e author proposed the Maximum-Minimum Ant Colony Optimization (MMACO) to make a formation of the colony of UAVs with the help of a multiagent system based on the Vicsek model. e MMACO nominates the best ant and MAS nominates the leader in each colony while the other UAVs remain agents. Furthermore, the leaders in each colony are responsible for communicating with the leaders of other colonies in order to complete a combined mission.

Structures of UAV Formation
ere are two main configurations of the UAV formation in the leader-follower model, namely, the follower formation and the diamond formation [30,31]. e schematic diagrams of the two formation configurations are shown in Figure 1. Various other complex formations are formed from the development of these two typical configurations.
ese two formation configurations have both advantages and disadvantages [2]. e land area covered by the follower formation is the smallest, thus reducing the probability of detection by reconnaissance troops or enemy ground radar and improving the formation survivability, but there is less information detected. e diamond formation can detect a large area to ensure a good vision for each member of the team; it may also increase the probability of discovery by the enemy [32]. e two basic configurations of formation are diamond and follower formation in which many common UAV formations can be evolved, such as "plus" shape and "arrow" shape. e common formation structures are shown in Figure 2.
Since the formation of drones has a big effect on the overall performance of the entire formation, to enhance the efficiency of the formation, reduce energy loss, and avoid danger, some new formation structures are getting more and more attention [5], as shown in Figure 3. e formation of the above virtual leader formation structure can significantly reduce the communication lag among formation members and reduce the computational load of onboard processors [33]. As a result, the number of formation members can be increased. Other new formation structures also have their unique advantages.
In practical application, the formation should be designed reasonably according to the needs of the actual task, the number of formation members, the hardware communication, the processing capability of the machine processor, the transition of the UAV group, and other aspects of logistics support, to achieve optimal mission efficiency [34].

Problem Definition.
A leader-follower formation with three followers and a leader has to take off from the starting point and reach the targeted area while keeping their formation. Besides, UAVs face some input delays as well. e UAVs need to fly robustly and maintain their formation while also minimizing the lag between UAVs.

Preliminaries of UAV Formation with Communication Delay
During the flight of multiple UAV formations, all the members ensure the consistency of the formation configuration through mutual information transmission and sharing. In fact, in the process of the formation member's information exchange, the input lag is inevitable [35,36]. is situation has a certain impact on the stability of the entire system, so this section has some practical significance to study the consistency problem of the UAV formation system with time delays.
is the edge set, and A is the weight adjacency matrix. Figure 4 shows a communication topology of UAV formation. e edge of a directed graph can be expressed as where V p is expressed as the tail of this edge, and V q is expressed as the head of this edge. e weight adjacency matrix A � [a pq ], where the matrix elements represent the adjacency weight; a pq > 0 means that communication node p can get the information of node q; otherwise, a pq � 0. e diagonal matrix D � diag {d p p � 1, 2, . . ., k} has the elements of the i th row of matrix A added to get d p , and the Laplace matrix of graph G is defined as L � D-A, where G is an undirected graph; i.e., a pq � a qp . L is a symmetric positive semidefinite matrix. If G is undirected and any two nodes in it can be connected by edges, then G is called an undirected connected graph. Basic knowledge of graph theory states that the matrix L can be diagonalized to the minimum value of diagonal matrix Γ, i.e., 0 which satisfies the following: where λ 1 ∼ λ max are the eigenvalues of Laplace matrix L. Suppose that the communication topology of a formation system consisting of n drones is an undirected connected graph. e dynamic system model of the UAV is approximately defined by the following second-order model: where x p is the position status of the formation member p, v p is the speed status of formation member p, and u p is the control input of formation member p. Note that we are using 2D coordinates to represent the dynamic model of the UAV for simplicity while assuming that the altitude is constant.
To make sure that the members of the formation are consistent with their expected movement status, the following control protocol is adopted: where k 1 , k 2 , and k 3 are the control gains of the system and τ is the time delay for information to transfer from formation members q to p. r pq is the expected relative position of the formation members p and q, ] s is the expected speed of the formation, and h p is the ability index to obtain the expected speed information of the formation of aircraft. e matrix of the above control protocol is expressed as

Complexity
where R is the n × n matrix formed by r ij , and diag (AR) is a vector of A × R diagonal elements. H is the n × n diagonal matrix formed by h i ; x is a vector composed of the position status of formation members, is the vector of the formation members' speed states, and U(t) is the vector formed by the control input of formation members, U(t) � [u 1 (t), u 2 (t)..., u k ] T . en, the state equation of the system can be written as It can be seen from the state equations of the above system that the goal of the control protocol is at is, the relative positions of formation members p and q approach the expected relative position r pq , and the speeds of p and q both approach the expected speed ] s . e above is the mathematical description of the consistency problem of a UAV formation system.

System Control Model
Assuming that the autopilot of the leader and the follower in the formation is the same, then the autopilot model is composed of the first-order speed retainer, first-order heading retainer, and a second-order altitude retainer which are given as follows: where τ v , τ ψ , τ ha , and τ hb are the time constants of the autopilot; ] p (t), ψ p (t), and z p (t) are the actual values of the speed, heading angle, and altitude of the leader or follower; and ] pr , ψ pr , and z pr are the referenced values for the speed, heading angle, and altitude of the leader or follower. Note that equation (7) is only an approximate representation of the autopilot model.
Complexity 5 where (x c (t), y c (t), z c (t)) are the commanded directions for the aircraft. Since the heading angle deviation (ψ 1 (t) − ψ 2 (t)) of leader and follower during formation flight is generally a small amount, D x i and D y i represented the uncertainty in It is supposed that the disturbances inside the model of the system are affecting the formation of UAV uniformly; therefore, equation (8) can be simplified using the principle of small disturbance to obtain Assuming Taking follower V 2 as the research object, the state of the system is selected as Equation (11) is the system state equation of the follower. Taking [] 2r (t)ψ 2r (t)z 2r (t)] T as the system control input of the follower control model and [] 1 (t)ψ 1 (t)z 1r (t)] T as the system interference input of the leader to the follower control model, it can be seen from the state equation (11) that the follower system is a nonlinear, strongly coupled system.
It can be seen from the previous section that the x c and y c channels of the system are strongly coupled, and these two channels are decoupled from the z c channel. erefore, the 6 Complexity three channels should be decoupled first when designing the controller [37]. Still, we take the follower as the research object, to solidify the coupling terms in the state equation (11) of the system, and get where x cg and y cg control the relative position of curing at all times, and v 1g controls the speed of the long-time curing machine. At this time, the equation of state of the system is linear, and the x c and y c channels are decoupled, leaving only the heading angle coupling between the two channels.

Designing of Adaptive Hybrid Control Law
Since the actual UAV formation system is often susceptible to interference factors such as aerodynamic interference, the traditional PID controller parameters will not change after setting out, and it is difficult to adapt to the high dynamic changes of the internal parameters of the formation system [38,39]. e designed controller utilizes the adaptive property, which can adapt well to the changes of the internal dynamic parameters of the system and is suitable for handling complex nonlinear problems such as UAV formations [40]. e design of the controller with adaptive fuzzy PID control law can improve the control of the formation system effect.

Structure of the Adaptive Hybrid Controller.
e equation of the state of the formation system is the same as in Section 4. e basic principle of the designed control is to introduce fuzzy control into the formation system to adjust PID parameters online, thereby improving the controllability of the system. e control structure of the controller is shown in Figure 5. As Figure 5 shows, the formation reference position command knows where the formation has to go next whereas the formation maneuver command is the one that maneuvers the UAV leader into the desired position. After that, the adaptive fuzzy controller along with the PID controller makes sure that the remaining UAVs follow the leader and maintain the formation. e mathematical expression for the linear mixer error is calculated as where k ] , k x , k ψ , k y , and k z are the coefficients of the linear mixer. e mathematical expression of the adaptive hybrid controller is ψ 2c (t) � k ψp0 + Δk ψp e ψ I (t) + k ψi0 + Δk ψi t 0 e ψ I (t)dt + k ψd0 + Δk ψd _ e ψ I , z 2c (t) � k zp0 + Δk zp e z I (t) + k zi0 + Δk zi t 0 e z I (t)dt + k zd0 + Δk zd _ e z I .
Among them, k vp0 , k vi0 , and k vd0 are the initial proportional, integral, and differential coefficients of the speed channel; k ψp0 , k ψi0 , and k ψd0 are the initial proportional, integral, and differential coefficients of the heading channel, respectively; k zp0 , k zi0 , and k zd0 are the initial proportional, integral, and differential coefficients of the height channel; Δk vp , Δk vi , and Δk vd are the increment of the speed channel control parameters calculated by fuzzy inference; Δk ψp , Δk ψi , and Δk ψ d are the increment of the control parameters of the heading channel calculated by fuzzy inference; Δk zp , Δk zi , and Δk zd are the increment of height channel control parameters calculated by fuzzy inference.

Setting of Adaptive Hybrid Parameters.
e adaptive fuzzy hybrid controller is based on the error and its rate of change input, using fuzzy rules and algorithms to achieve the online adjustment of PID parameters. For the UAV formation system, we deal with speed, heading, and altitude channel, respectively. e fuzzy controller is inspired from [41], so for more details regarding the fuzzy function, the reader is referred to the aforementioned study. e inputs of fuzzy logic controllers are positioned and orientation errors along with their derivatives. It is in the range between − 1 and 1 used for the input error signals and their linguistic levels are defined as Positive High (PH), Positive Low (PL), Zero (ZR), Negative Low (NL), and Negative High (NH). e control decision is made using if-then rule bases as presented in Tables 1-3 for ∆k p , ∆k i, , and ∆k d , respectively. ese rules are inspired by [41]. e fuzzy controller outputs are fuzzy proportional gain (F Δk p ), fuzzy integral gain (F Δk i ), and fuzzy differential gain (F Δk d ) while their linguistic levels are normalized in the range from 0 to 1.

System Stability Analysis
First, to analyze the stability of the system, they are divided into two main types, i.e., frequency domain and time domain. On the one hand, the time-domain analysis mainly uses Lyapunov-Krasovskii functional methods to Integrator Figure 5: Formation controller structure.
8 Complexity discuss the stability of the system in the time domain. On the other hand, the frequency domain analysis method mainly discusses the stability of the system by analyzing the characteristic roots of the matrix in the frequency domain [42]. is section discusses the system stability using the structure singular value method in the frequency domain. e state equation (5) of the system is nonhomogeneous, and its homogeneous form is discussed without losing conservatism. e homogeneous form of the state equation (5) is given as where y is the state of the system, i.e., y(t) � [x(t) v (t)] T ; M and O are the matrices corresponding to the state equation of the system in the form of Since the communication topology of the UAV formation system is an undirected connected graph, the Laplace matrix L can be transformed into a diagonal matrix Γ � diag {λ 1 , λ 2 ... λ n }. en, there must be a nonsingular matrix T that can satisfy the following two formulas: Among them, Λ refers to the diagonal matrix, Λ � diag {Λ 1 , Λ 2 , ..., Λ k }. Let y � (I 2 ⊗ T)ξ(t); substituting it into equation (15), it becomes   e Kronecker product (represented by ⊗)) has the following properties: when the U and W dimensions of the matrix are the same, and the V and Z dimensions are the same, Since I k , Λ, and Γ are all diagonal matrices, the system equation (19) can be decomposed into k second-order systems, and the state equation of the subsystem is (20) where F is the coefficient matrix of the subsystem given as e characteristic equation of the subsystem is e product of the characteristic equations of all the above subsystems is the characteristic equation of the entire system. From the expression of the matrix F, the determinant is 0. We expand the characteristic equation (22) to get where N 1 and N 2 are the gains of the system. From equation (23), when λ N � 0, s 2 becomes 0; i.e., the stability of the system has nothing to do with τ. When λ N ≠ 0, equation (23) can be rewritten as Making a complex domain transformation, let s � ωi, and substitute it into equation (24) to get e modulus of both sides of the equation can be obtained as Let p � ω 2 ; then, equation (26) is a quadratic equation of one variable. From the root conditions of the quadratic equation of one variable, the equation has a positive real root and a negative real root, so ω must be an imaginary solution for any parameter; the system will cross the imaginary axis.
Taking the angles on both sides of equation (25), we can get erefore, the analytical form of the time delay τ can be obtained as ω is determined by formula (26). For different m in formula (26), we can theoretically find countless multiple time delays τ. It can be proved that when m takes a number greater than 0, the characteristic roots of the system equations are all in the right half-plane and the system is unstable.
By calculating the partial derivative of the time delay τ for formula (23), we can get Assuming that the time delay τ satisfies formula (28), and we know that λ k is greater than 0 for all eigenvalues of k > 1, let s � ωi and take the intermediate variable as q: Since R(c) is the real part of the complex number c, R(ds/dτ) can be given as Since q > 0, it can be seen from formula (31) that When τ is 0, the characteristic equation of the system becomes At this time, all the roots of the equation are on the left half of the system, and the system is stable. When τ increases, the characteristic roots of the system will gradually move to the right to the crossover frequency ωi, because the real part of the partial derivative of s to τ is always greater than 0. So, the characteristic root of the equation will not return to the left half-plane after moving to the right half-plane. erefore, for formula (28), when m is a number greater than 0, the characteristic root of the system will be on the right halfplane.
e system is unstable, the value of m is 0, and formula (28) becomes 10 Complexity It can be seen from equation (34) that τ and ω are roughly inversely proportional to each other, and ω and λ k are directly proportional to each other, so the largest characteristic root λ max corresponds to the smallest delay; that is, the upper bound of the delay τ f is determined. When τ is less than τ f , the system is uniformly stable, and when τ is greater than or equal to τ f , the system is unstable. e path planned by the hybrid algorithm mostly consists of a series of line segments. To make sure that the path generated is smooth and flightworthy, the B-spline curve strategy is used. e B-spline curve is an improvement of the Bezier curve method and has the advantages of preserving convexity and geometrical invariability.
Mathematically, the B-spline curve can be given as where d p (i � 0, 1, . . . , n) are the controlling points and N p,q (u) are the normalized q-order B-spline functions and are defined with the help of the Cox-de Boor recursion method as  Complexity e parametric knots u 0 ≤ u 1 ≤ . . . ≤ u n+q determine the basic functions of the B-spline curve. e B-spline curve is not affected by just moving a single control point, as opposed to the Bezier curve. Another advantage over the Bezier curve is that increasing the control points will not increase the degree of polynomials.

Simulation Results
is chapter mainly conducts mathematical simulation on the theoretical research above and qualitatively analyzes the algorithm principle through the simulation results. Initial alignment is carried out taking into account the  measurement errors of the gyroscope and accelerometer, the proposed algorithm is used for fine alignment, and MAT-LAB software is used for mathematical simulation. We are using a simplified UAV model with autopilot. e parameters for the simulation are given in Table 4.
In Figure 6, it is apparent that since the acceleration of gravity is equivalent to damping on the pitch and roll channels, the error estimates of the pitch and roll channels converge faster and have higher accuracy. While there is no damping, the error estimation of the heading channel converges slowly and the accuracy is low, and the filter gain can quickly converge to a small steady-state value, as shown in Figure 7. It indicates that the initial alignment of the strapdown inertial navigation system is feasible to meet the initial value requirements of the strap-down inertial navigation system.
We set the error indexes of the gyroscopes and accelerometers as standard error characteristics. We select the initial values of the position, velocity, and attitude of the reference track as the initial navigation solution value. e reference real trajectory curve is generated by the trajectory generator, and the navigation trajectory curve is solved by the strap-down inertial navigation system (SINS) for simulation verification. e initial conditions of the simulation are shown in Table 4. e values in Table 4 were chosen to maximize the chances of getting the most optimal result. Figure 8 represents the position curves of the strap-down inertial navigation system. As it is clear, the first part of the figure shows the latitude. It holds steady for the first half of the flight and then gets slightly lower for the second half. Similarly, for the longitude, it remains stable for the first half and slightly increases in the second half. Finally, the height starts to pick up slowly, and around the mark of 400 seconds, it starts flying much higher than the last first half. Figure 9 offers the velocity curve of the strap-down inertial navigation system. e figure represents the three components of the velocity vector. So, when the formation moves in the direction of the x-axis, a variation is observed in the first part of the figure. Similarly, for the y-axis, there is a change in the second figure, and for the z-axis, a variation appears in the third figure. Figure 10 presents the attitude curve of the strap-down inertial navigation system. Attitude mainly corresponds to the maneuvering and turning of the UAVs. So, when the UAV turns in the direction of the x-axis, a change appears in the φ x graph. Likewise, when the UAV maneuvers toward    the y-axis and z-axis, similar variations emerge in the φ y and φ z graphs. Figure 11 represents the applied velocity disturbance on X and Y coordinates of all UAVs including the leader and followers with identical values. Each diagram shows that the disturbance is applied to the system after around 500 seconds where the velocity components changed from 0 m/s to 0.6 m/s. Moreover, the z component of UAV dynamics remains unchanged. Figure 12 estimates that the tracking at X is better than Y. At the X coordinate, the maximum error occurred at 0.22 m despite a huge spike initially. In contrast with the X coordinate, the Y coordinate shows better estimated tracking initially but has a large error value of 0.5 m after 600 seconds.
Finally, Figure 13 shows the trajectory traveled by the formation. As it is clear, the leader is ahead of the formation and the followers are pursuing it in a tight formation. e formation also maneuvers the hilly peaks without any collision. e UAVs also avoid collision among themselves. e hybrid algorithm has successfully suppressed any delays and maintains its configuration.

Conclusion and Future Scope
is article designs an adaptive hybrid algorithm for the formation control of UAVs along with communication delays. e proposed hybrid controller is a combination of the PID and the adaptive fuzzy controller with integral feedback. e performance of the PID controller is fine-tuned by introducing fuzzy logic in this research. To validate the proposed scheme, several simulations have been performed with respect to different parameters. Simulations estimate that the errors are within optimal range and filter gains are steady. e position and the velocity simulations show that the movement and speed of the UAVs are stable despite incorporating the disturbances in the system. e final simulation demonstrates the trajectory of the UAVs among the hilly peaks. It shows that the UAVs remain in a tight formation while also avoiding any collision.
Future researchers can include dynamic obstacles and omnidirectional wind disturbances in the proposed system to make it more resilient. ese limitations can be challenging for scholars in the future to handle especially in a real-time environment. Performance enhancers may also be added to improve stability during flight formation to achieve the target with high convergence speed.

Data Availability
All data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.