## 5 Control Algorithms for UAV Networking
### Distributed Control Algorithm  
Distributed control in UAV swarm systems is a control method in which each UAV operates based on information obtained from neighboring UAVs without direct guidance from a control center. This approach enhances the flexibility, adaptability, and robustness of UAV swarms, especially in complex environments or when there is a communication problem [116]. Distributed control algorithms often use multi-agent control theory, consensus, and formation to ensure that UAVs can maintain the desired formation structure, avoid collisions, and perform common tasks efficiently. Thanks to this model, UAV swarmscan operate in many fields such as surveillance [117], exploration [118], and search and rescue [119] with high performance and good scalability. A distributed formation control algorithm based on the non-smooth backstepping method has been developed to control multiple UAVs in a leader-follower model. First, a position controller is designed using an optimal tuning method according to the quadratic linear controller. This enables all UAVs to converge to the desired formation model. Next, an attitude control system is constructed using the finite-time control technique combined with switching control to ensure that UAVs accurately track the desired state within a finite time period to show that all UAVs converge to the desired formation in 3D space [120]. In [121], a distributed formation control for vertical takeoff and landing UAVs is proposed. The communication network between UAVs can change over time. The system uses a hierarchical control framework, in which distributed command forces are calculated based on the positions and velocities of neighboring UAVs. An attitude control model using the backstepping method is implemented to ensure that the UAVs track the desired pitch angle. A support system is designed to maintain the thrust limit, avoid singularity, and eliminate the requirement for acceleration information of neighboring UAVs. The asymptotic stability of the system is ensured through the Lyapunov method. In [122], the authors propose a distributed adaptive tracking control system to solve the UAV formation control problem under the conditions of limited inputs, actuator errors, and external environmental disturbances. The system applies an adaptive backstepping method combined with command filtering to handle uncertainty in the UAV model and input saturation problems. In addition, the fault-tolerant controller is designed to estimate and compensate actuator errors, as well as external disturbances. The stability of the closed-loop system is guaranteed even when the interaction graph is undirected. In [123], the authors propose a distributed formation control strategy developed for UAVs with three degrees of freedom, in which the information flow between UAVs is described by a directed graph and a spanning tree with the leader UAV acting as the root. Only position information is transmitted between UAVs, which reduces the data requirements. A simple backstepping method is applied to design the distributed controller. The stability analysis based on Lyapunov proves the effectiveness of this method. In [124], a new distributed consensus algorithm for nonlinear quadratic multi-agent systems (MAS) is proposed based on the leader-following model. This algorithm provides smooth control signals, avoiding the chattering phenomenon commonly encountered in traditional sliding control. In addition, a new formation control system is developed by integrating the distributed consensus algorithm into the three-dimensional geometric model. It enables the UAVs to accurately track the formation. The algorithm is highly efficient in controlling the UAV in the desired formation pattern. Figure 31 illustrates a distributed control scheme in a UAV swarm system, in which UAVs maintain formation through communication with each other.