Energy consumption in wireless sensor networks