Formation control of singular multiagent systems with switching topologies