Abstract:UAV formation has a wide range of application value and development prospects, However, The dynamic model of UAV is highly coupled and nonlinear, with numerous uncertainties in practical applications.which limits its application. Aiming at the inaccuracy of the formation model caused by the perturbation of the internal parameters of the UAV formation, this paper combines the related theories of distributed consistency and linear quadratic, and then proposes an optimal formation controller based on data-driven adaptive dynamic programming (ADP). First, based on the virtual leader-follower model, the UAV"s nonlinear dynamics model is simplified and decoupled into four linear subsystems, and the formation controllers are designed respectively for them, and the detailed design steps and verification process are given. Next, the stability of the algorithm is analyzed using Lyapunov stability theory. To verify the stability and effectiveness of the proposed algorithm, simulation results are presented.