# Towards Hybrid Energy-Efficient Power Management in Wireless Sensor Networks
## 3 HEEPS: A Hybrid Energy-Efficient Power Manager Scheduling  
Applying several energy management strategies at once provides more energy benefits than settling on one method. Therefore, we propose an online HEEPS power manager that incorporates three energy management strategies. This results from the trade-off between time constraints and power-modes.  
By providing a functional modeling of a low power energy manager, the need for manual intervention is minimized. The advent of functional and structural failure risks is eliminated through the use of a robust verification methodology. A low consumption system level model is presented that acts on the wireless sensor network both at the local node level and at the global level, i.e., at the network level. The development process is described in Figure 3. The \"Task Allocation\" phase distributes tasks to all nodes. Once the inputs (time settings, tasks number, or nodes number) are set, the GEDF scheduler sorts the tasks in the \"Task Scheduling\" phase. However, selecting the application-specific energy management technique is done in the \"Energy Monitoring\" phase at the local level. The \"Performance evaluation\" phase involves measuring the performance metrics.  
This model is built on low-power typical processor characteristics such as frequency, voltage, and timing constraints. The backend design of HEEPS model is illustrated in Figure 4. Through the hardware (resources) and software architecture (tasks) and the scheduler, the STORM simulator can allocate and schedule the tasks according to GEDF [16]. Overheads and delays are supported by the scheduler as well. The XML file is loaded with the inputs before the simulation. The results are displayed as Gantt charts or as PDF reports to debug the model and show the behavior of the network. HEEPS is used as an interlayer in-between the application level and the hardware resources for energy manager portability.  
The on-line characterization allows to predict the mode of consumption and the appropriate voltage/frequency couple at a given moment. The increase in the execution time when tasks are active, through the DVFS, contributes in particular to the minimization  
Figure 2: Power Management Taxonomy at CPU Level.  
of the period of inactivity, allowing more efficient use of low consumption states. DPM is applied during idle intervals while DVFS is applied when the task is running as in Figure 5.  
Figure 4: Backend Design of HEEPS Model.  
Figure 5: Flowchart of Execution of HEEPS.  
Figure 3: HEEPS Phases Integration.  
Algorithm 1 gives a formal description of both DPM and DVFS strategies with the simulator STORM when the scheduling constraints are satisfied.  
```
Data :\(ready\_task\_list,CPU\_list,task\_list:string\) Result : Energy, Task state \(Task\_Activation()\); while\(GEDF(\alpha)\)do if\((CPU\_state==idle)\&\&(t_{transition}=t(CPU\_state==idle)-(CPU\_state==Running)>threshold)\)then \(CPU\_state==DeepSleep else \(\triangleright\) CPU.state==Running \(Select\_frequency(x)\) \(min\_frequency_{i}\in f_{1},...,f_{m}\mid f_{1}<...<f_{m}\) where \(x\leq\frac{f_{i}}{f_{m}}\)  end if  end whileTask.Finish()
```  
**Algorithm 1**HEEPS Implementation  
The choice of the Actual execution Time (AET) in STORM is made according to the Real Execution Time (AETRule). It can be equal to WECT or random comprised between the BCET, and the WCET selected after each new activation. WCET means \"Worst Case Execution Time\" and BCET stands for \"Best Case Execution Time\".