The formation control of multi-agent systems has garnered significant research attention in both theoretical and practical aspects over the past two decades. Despite this, the examination of how external environments impact swarm formation dynamics and the design of formation control algorithms for multi-agent systems in nonlinear external potentials have not been thoroughly explored. In this paper, we apply our theoretical formulation of the formation control algorithm to mobile robots operating in nonlinear external potentials. To validate the algorithm's effectiveness, we conducted experiments using real mobile robots. Furthermore, the results demonstrate the effectiveness of Dynamic Mode Decomposition in predicting the velocity of robots in unknown environments.