Energy constraints and lifetime performance in wireless sensor networks