Particle swarm optimization for auto-localization of nodes in wireless sensor networks