# Towards Hybrid Energy-Efficient Power Management in Wireless Sensor Networks
## 4 Simulation Setup  
To extend the node lifetime, new utilities are needed to facilitate the development of sensor networks. Pre-prototyping tools, for example, must provide fast and reliable results at a low cost to guide the design or the validation choices of the appropriate hardware. The simulator must not only imitate the real world, but also take into account certain metrics that certainly have significant impacts on network characteristics. These metrics include the time (latency, lifetime, idle time, transmit/receive time, etc. ), throughput, power consumption, and quality of service (network failure, coverage, and packet loss). The simulation models the node's behavior since they use profiling rules and describe the node as a finite state machine. The feedback received contributes to the energy efficiency upgrade. The study of more than 25 simulation environments in [16] conducted to the STORM simulator. Its multiple advantages correspond to tracking the realistic temporal evolution of tasks where each CPU is equivalent to a real node. It also allows a large-scale simulation with several nodes. Although the transitions add extra costs and risk tasks missing their execution, they are rarely invested in the research work. Additionally, each power-mode refers to a particular energy and delay, overlooking them brings error, hence, we need a precise modeling and not approximation. For this reason, the multitasking system used promotes the use of scheduling, otherwise it lengthens the ET in case of DVFS. Predetermination of system behavior is an onerous task, which is why we chose the online scheduling. This approach is also important given the evolving nature of energy. Although our simulations are restricted to a periodic model, they can be extended to an aperiodic or sporadic model. The GEDF scheduler is based on a periodic, preemptive task set where the deadline is equal to the period with no task affinity (tasks can change CPU). The GEDF performs both the allocation of tasks to processors and makes scheduling decisions. After each period \(T_{i}\), the GEDF scheduler must keep track of the deadlines values \(D_{i}\) and check if any new task with a smaller deadline value arrives as shown in Figure 6. In a context of global scheduling, and since some task sets may be not schedulable even though they have low utilization (much less than the number of processors) and in order to respect temporal constraints, our scheduler is distinguished by an association of conditions of [PERSON], and [PERSON] and [PERSON] and [PERSON]. Indeed, comparing the total usage rate \(u_{Total}\) to the CPUs number leads to a set of non-schedulable tasks (starvation). Therefore, other conditions should be applied to test the schedulability of the GEDF, including the threshold on \(U_{max}\) which are those of [PERSON], [PERSON], and [PERSON] (GFB) [11] and [PERSON] and [PERSON] [12] :  
* In the GFB rule, the total utilization ratio threshold is: \[u_{max}\leq m\cdot(1-u_{max})+u_{max}\] (1) where \(u_{max}\) is the maximum utilization rate of task and \(m\) is the number of CPU (in our case \(m=5\)). We found 1.406, which is well below the GFB threshold, which is 3.8. * The utilization rate of [PERSON] and [PERSON] for each task is \[u_{max}\leq\frac{m}{2\cdot m-1}\] (2) Tasks are scheduled on \(m\) processors as long as the total utilization is: \[U_{total}\leq\frac{m^{2}}{2\cdot m-1}\] (3) As a result, we have \(U_{i}=0.3<0.55\) and \(U_{total}=1.406<2.77\). Table 3 presents the temporal characteristics of tasks. A set of 10 periodic tasks, where \(T_{i}\) represents the task \(i\) and \(T_{i}=D_{i}\). The scheduling test is verified under the GEDF scheduler. We relied on the system's energy levels and node usage profiles to decide which policy to use between DPM and DVFS techniques. A description of the the simulation metrics is given in Table 4.