Wireless sensor networks (WSN) have some specific constraints. One major constraint is due to the fact that sensors are deployed in a hostile area and that they need to be powered by batteries. Therefore, the lifetime of the sensor is dramatically related to the amount of initial power loaded in the battery and to the way it is consumed. The control of the energy consumption of sensors is an active research field.