## 5 Control Algorithms for UAV Networking
### Distributed Control Algorithm
The formation structure is organized in a triangular form, where each UAV not only receives information from a leader UAV but also exchanges data with neighboring UAVs through communication channels, as represented by dashed arrows. This allows the system to operate in a self-organizing mechanism, allowing UAVs to automatically adjust their positions based on data collected from the environment and other UAVs without the need for a fixed control center. This approach increases the flexibility and adaptability of the swarm in missions such as surveillance, search and rescue, or military operations, especially when a UAV fails or loses communication with the central control system. Each method has its own advantages and disadvantages. Depending on the specific requirements of the task, methods can be selected or combined to achieve optimal efficiency, as shown in Table 6.  
In this study, we have discussed different control models, including centralized, decentralized, and distributed control. Each model has its own characteristics that affect network performance and communication mechanisms. Centralized control requires a strong connection and stable bandwidth to transmit commands from the ground control station (GCS) over datalinks to UAVs. Decentralized control relies on local decision-making. It minimizes communication requirements but poses challenges in terms of synchronization between UAVs. Distributed control models, with consensus algorithms or collective dynamics, allow UAVs to self-adjust based on local sensor data, and they optimize through adaptive routing strategies. Control algorithms also have an impact on flight system stability, tracking of desired trajectory, compensation of errors and disturbances from the environment, adaptation to model changes, optimization of operations (energy, performance), and coordination of UAV swarms. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Advantage** & **Disadvantages** \\ \hline Leader-follower & - Easy to deploy and control. & - Vulnerable to instability if the lead UAV crashes. \\  & - Ensures accurate formation. & - Inflexible in dynamic environments. \\  & - Suitable for highly organized missions. & - Poor scalability. \\ \hline Virtual structure & - Ensure stable formation shape. & - High computational complexity. \\  & - High precision in control. & - Difficult to adapt to changing environments. \\  & - Suitable for UAVs with tight linkage. & - Requires high synchronization between UAVs. \\ \hline Behavioral based & - Flexible and adaptable to dynamic environments. & - Difficult to ensure stable formation shape. \\  & - No central control required. & - Need to adjust parameters reasonably to avoid conflicts between behaviors. \\  & - Suitable for exploration and obstacle & - Need to continuously transmit information between UAVs. \\ \hline Based on consensus & - Ensure synchronization between UAVs. & - Need to continuously transmit information between UAVs. \\  & - Clear mathematical model; can prove & - Can be affected by communication delay. \\  & - Convergence. & - Need a fault tolerance mechanism when UAV is \\  & - Can be extended to large number of UAVs. & lost in the system. \\ \hline Artificial potential field & - Smooth control; effective collision avoidance. & - Can get stuck at local equilibrium point. \\  & - No need for complex data exchange. & - Difficult to adjust when there are multiple \\  & - Suitable for navigation in environments & targets or dynamic obstacles. \\  & & \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of advantages and disadvantages of UAV formation control methods. Figure 31: Distributed UAV formation control model based on interaction and information exchange between UAVs in the swarm.