We describe a decentralized formation problem for multiple robots, where an formation controller is proposed. The network of dynamic agents with external disturbances and uncertainties are discussed in formation problems. We first describe how to design social potential fields to obtain a formation with the shape of a polygon. Then, we provide a formal proof of the asymptotic stability of the system, based on the definition of a proper Lyapunov function and technique. The advantages of the proposed controller can be listed as robustness to input nonlinearity, external disturbances, and model uncertainties, while applicability on a group of any autonomous systems with -degrees of freedom. Finally, simulation results are demonstrated for a multiagent formation problem of a group of six robots, illustrating the effective attenuation of approximation error and external disturbances, even in the case of agent failure or leader tracking.