Energy efficient PSO-based algorithm for optimizing autonomous wireless sensor network