Lifetime analysis of wireless sensor nodes in different smart grid environments