Locating specific sensor nodes can be a difficult process in wireless sensor networks, making it one of the most difficult aspects of these networks. It is helpful in pinpointing the precise location where something took place. As a result of the fact that this is a one-time process, nodes are often only localised once for the course of the network entire existence. On the other hand, a landslip or some other catastrophe that takes place in the real world can lead the nodes of the network to become distributed across it. When something comparable does place, it is absolutely necessary to be aware of the locations of these sensor nodes. In this paper, we suggest a different localization technique, one that is able to function with sensor nodes that have been moved. The system that has been proposed takes into account DV-Hop localization methods that are based on particle swarm optimization (PSO). We also take into consideration the electromagnetic abnormality model as an illustration of how the strategy that was described could be implemented in an anisotropic network. When compared to the conventional PSO DV-Hop structure, the simulations’ findings indicate that our innovative localization framework significantly reduces the amount of time, inaccuracy, and power consumption required.