This study addresses the cooperative control problem of quadcopter UAV clusters under switching topology.A distributed control framework based on virtual errors is proposed.Firstly,a time-varying switching undirected topology is used to demonstrate the intermittent transmission characteristics in communication links in a constrained environment.The weighted adjacency matrices are designed to be continuous and differentiable,which is employed to indicate the transmission delay as well as the connectivity of the switching topology.Subsequently,a barrier Lyapunov function is set for the attitude error system to prove the stability of the inner loop control system.Additionally,this method introduces two cascaded auxiliary control variables to obtain an error system that includes virtual errors both in position and velocity.Using this virtual error system,control inputs and thrust are bounded,avoiding the requirement for real-time feedback on the positions and velocities of the nodes.A Lyapunov function for the closed-loop system,incorporating the cluster's overall stacked virtual error states,is designed for position control.Finally,simulations are conducted on a time-varying undirected switching topology,which satisfies consistent joint quasi-strong connectivity.The control law is validated by implementing four independently grouped quadcopter UAVs.These simulation examples further illustrate the effectiveness of the control algorithm proposed in this study.