A time-varying formation control method for multi-agent under switching topologies is proposed,which utilizes the desired formation state,the agent itself state and the communication topology to achieve time-varying formation stability control for multi-agent with observation noise and frequent disconnection of communication links.Firstly,the dimensionality of the system is reduced by matrix replacement.Then,the stochastic differential equation theory and Lyapunov stability theorem are applied to derive necessary and sufficient conditions to ensure the stability of the formation system under normal switching and random switching,as well as the formation convergence index that can reflect the convergence performance of the formation.Finally,under the simulation conditions of a formation composed of four agents and four alternate topologies,it is verified that the proposed control method can effectively ensure the stability of the multi-agent formation in the switching topology.Compared with the normal switching topology,the random switching topology can converge the formation error to less than 10-2 faster,and the efficiency is increased by about 34.4%.At the same time,the convergence index of formation also confirms this conclusion and the accuracy of formation and application range is better than that of normal switching topology.