Power Management in Supercapacitor-Based Wireless Sensor Nodes Power Management in Supercapacitor-Based Wireless Sensor Nodes

This chapter studies a power management problem for supercapacitor-based wireless sensor nodes with energy harvesting capabilities. A dependent task scheduling algorithm for nonpreemptable tasks with precedence constraints is developed. The modified first in first out (MFIFO) algorithm takes into account supercapacitor state and energy harvesting. Task precedence constraints are handled by defining a variable called task effective release time. Results show that the MFIFO algorithm improves the energy performance of the first in first out (FIFO) algorithm and maintains the timing perform- ance at the same time.


Introduction
Wireless sensor networks have been developed for many applications. A wireless sensor network is composed of a large number of spatially distributed wireless sensor nodes. Wireless sensor nodes are usually powered by nonrechargeable batteries with limited capacity. Therefore, energy efficiency is a major concern. To maximize the network lifetime, various power management strategies have been proposed to minimize the energy consumption. In the meantime, numerous energy harvesting technologies have been developed to increase the energy income. Environmentally powered wireless sensor nodes usually need energy storage systems [1] to buffer the harvested energy. Typical energy storage systems include rechargeable batteries [2], supercapacitors [3][4][5], and hybrid systems [6,7]. In general, rechargeable batteries have a larger capacity while supercapacitors have a much longer cycle life. The major drawback of supercapacitors is their high self-discharge rate. Supercapacitor characteristics must be taken into account to develop effective power management solutions. For instance, supercapacitor self-discharge is considered in Refs. [3,6]. This is because the supercapacitor terminal voltage is a critical parameter in analyzing the power behavior of supercapacitor-based energy storage systems, and self-discharge results in voltage drop. Because of the significance of the voltage drop during self-discharge, this characteristic has been extensively examined [8][9][10][11][12][13][14].
While supercapacitor self-discharge leads to voltage drop, this characteristic cannot completely characterize the supercapacitor voltage behavior. In fact, the supercapacitor voltage may increase under the open circuit condition [15], which is due to the charge redistribution characteristic. A mechanism of the low ionic mobility in supercapacitor micropores is identified in Ref. [16]. The impact of charge redistribution on power management is qualitatively investigated in Ref. [17]. A detailed analysis of the voltage change during charge redistribution is performed in Ref. [18]. In Ref. [19], the modified earliest deadline first (MEDF) algorithm is developed for scheduling independent tasks. This chapter extends the results in Refs. [17][18][19] and studies a new power management problem. Specifically, this chapter develops a modified first in first out (MFIFO) algorithm for scheduling tasks with precedence constraints in environmentally powered wireless sensor nodes that use supercapacitor-based energy storage systems. The MFIFO algorithm takes into account supercapacitor charge redistribution and energy harvesting. Task precedence constraints are handled by defining a variable called task effective release time. While the first in first out (FIFO) algorithm only considers the timing constraints of tasks, the MFIFO algorithm also considers the energy constraints.
The remainder of this chapter is organized as follows. Section 2 describes a system model for analyzing the power flow in wireless sensor nodes. Section 3 develops the MFIFO algorithm. Section 4 illustrates the implementation setup. A case study and extensive simulations are performed to evaluate the algorithm performance. These qualitative and quantitative results demonstrate that the MFIFO algorithm improves the energy performance of the FIFO algorithm while maintaining its timing performance. Section 5 concludes this chapter.

System model
This chapter adopts the wireless sensor node power model used in Ref. [19]. As shown in Figure 1, this model is composed of five modules: energy harvester, input power conditioning unit, energy buffer, output power conditioning unit, and energy user. Energy harvesters such as solar cells and piezoelectric films convert energy in other forms to electricity. Typically, an input power conditioning unit is needed to bridge the energy harvester and the energy buffer. For example, a solar-powered wireless sensor node usually includes a maximum power point tracker (MPPT). Energy buffers such as rechargeable batteries and supercapacitors are devices that store the harvested energy. An output power conditioning unit is often necessary to generate a suitable power supply for the energy user. DC-DC converters are commonly used modules to bridge the energy buffer and the energy user. Energy users are mainly RF transceivers, microcontrollers, and sensors. The power model can be further abstracted to facilitate analyzing the power flow in wireless sensor nodes. As shown in Figure 1, the power model has three components: energy source, energy storage, and energy consumer. The energy source includes the energy harvester and the input power conditioning unit. For clarity, the energy buffer is referred to as the energy storage in this three-component model. The energy consumer combines the output power conditioning unit and the energy user. This abstracted model introduces two benefits. First, by separating energy buffers and power conditioning units, it is more convenient to study the impact of energy buffer characteristics on power management in wireless sensor nodes. Second, experiments with energy buffers can be readily designed and performed. The effects of input and output power conditioning units are taken into account in the process of designing the experiments.

Energy source model
The component models are shown in Figure 2. The energy source is modeled as a current pulse train. As shown in Figure 2(a), each current pulse is characterized by three parameters: begin time B S , duration D S , and weight W S , which is the current magnitude. It should be noted that the energy source pulse is the conditioned pulse that is actually injected into the energy storage system. For example, in a solar-powered sensor node, the current pulse conditioned by the MPPT and fed into the energy storage system is the current pulse described in this energy source model. By tuning these three parameters, energy source profiles with different characteristics such as time span and power level can be generated.

Energy storage model
The energy storage system is a single supercapacitor. Figure 2(b) shows the variable leakage resistance (VLR) model [10,11,17,18] for supercapacitors, which is a simplified equivalent circuit model. In this model, the first branch has three components: resistor R 1 , constant capacitor C 0 , and voltage-dependent capacitor K V * V. The total capacitance of the first branch is C 1 = C 0 + K V * V. This branch models the voltage dependency of supercapacitor capacitance.
The second branch includes resistor R 2 and capacitor C 2 . This branch models the charge redistribution behavior. The variable leakage resistor R 3 characterizes the time varying selfdischarge.
In addition to the model parameters, the voltages across the capacitors in the VLR model are also critical to determine the supercapacitor state. The charge stored in a supercapacitor tends to redistribute among RC branches after a charging or discharging process because each branch has a different time constant. Charge redistribution is a transient response to the supercapacitor initial state, which is characterized by the initial voltages V 1 and V 2 across the capacitors C 1 and C 2 . For example, if V 1 > V 2 , the supercapacitor terminal voltage decreases with time because part of the charge stored in C 1 is transferred to C 2 . Therefore, to characterize a supercapacitor, the initial voltages across the capacitors in the VLR model must be specified.

Energy consumer model
When the energy consumer initiates an event, the energy storage system is assigned a task. The energy consumer is therefore modeled as a current pulse train. As shown in Figure 2(c), each task is defined by four parameters: release time R, execution time E, absolute deadline D, and weight W. The release time is the instant of time at which the task becomes available for execution. The execution time is the amount of time required to complete the execution. The absolute deadline is the instant of time by which the task execution is required to be completed. Release time, execution time, and deadline are temporal parameters defining the timing constraint of a task. The weight of a task is its current magnitude. This parameter defines the energy constraint of a task.

Task precedence constraint and effective release time
In this chapter, the tasks are assumed to be dependent and nonpreemptable. In addition to the four parameters (release time, execution time, deadline, and weight) used to characterize the task model, a task may also have precedence constraints. If tasks are constrained to execute in some order, they are said to have precedence constraints. The precedence constraints among tasks are specified using precedence relations [20]. A task T p is a predecessor of another task T q (and T q a successor of T p ) if T q cannot begin the execution until the execution of T p completes. This fact is usually denoted by T p < T q . Two tasks are independent when neither T p < T q nor T p > T q . A task with predecessors is ready for execution when the time is at or after its release time and executions of all the predecessors are completed. Without loss of generality, it is assumed that in this chapter a task may have no more than one predecessor or successor for simplicity.
The release times of tasks with precedence constraints are sometimes inconsistent with the precedence constraints, which means that the release time of a task may be later than that of its successor. Figure 3 shows two tasks T p and T q using solid lines. If T p < T q , the release time of task T q is earlier than the release time of T p , which is not consistent with the precedence constraint. A parameter called the effective release time of a task is defined to deal with such inconsistency. The effective release time of a task without predecessor is equal to its release time. The effective release time of a task with predecessor is equal to the maximum value between its release time and the release time of its predecessor plus the execution time of its predecessor. For example, the effective release time ER q of T q is defined by Eq. 1 depending on whether there is a precedence constraint. As shown in Figure 3, the task T q denoted by dashed lines shows its effective release time if T p < T q .

MFIFO algorithm development
The MFIFO algorithm has three steps. First, create an initial schedule using the FIFO algorithm. This step takes care of the timing constraints and precedence constraints of tasks. Second, calculate the ready time adjustment margin based on the initial schedule. This margin determines how much delay is allowed if the ready time of the initial schedule is adjusted. Third, the ready time offset is determined based on supercapacitor state and energy harvesting. The start time of a task is the ready time plus the ready time offset.

Create an initial schedule using FIFO algorithm
The FIFO algorithm is used to create an initial schedule to ensure that the task precedence constraints are satisfied. The tasks are originally defined by the task set the precedence constraints T p < T q . The precedence constraints are transformed into timing constraints by defining the effective release times. A task is then characterized by four parameters: effective release time ER, execution time E, deadline D, and weight W. The task set is now The FIFO algorithm sorts the effective release times in the ascending order and determines the ready times of the tasks. The initial schedule is determined using Algorithm 1.

Algorithm 1:
Create an initial schedule using FIFO algorithm.
Require: A set of N ready but not scheduled tasks:

MFIFO algorithm
Once the initial schedule is determined, the ready time adjustment margin and ready time offset are calculated using the algorithms for the second and third steps in the MEDF algorithm [19], respectively. In particular, the release times used in the MEDF algorithm should be replaced by the effective release times. The complete MFIFO algorithm is summarized in Algorithm 2. The inputs of this algorithm include a set of N ready but not scheduled tasks, ; task precedence constraints, T p < T q ; energy source model, E S (B S , D S , W S ); and supercapacitor initial state, V 1 (t = 0) and V 2 (t = 0). The MFIFO algorithm is a three-step process: 1.
Step 1: Create an initial schedule using Algorithm 1. The input of this algorithm is the task set T = T i (R i , E i , D i , W i ) and task precedence constraints T p < T q . The output is the initial schedule T FIFO defined by task ready time A i :

2.
Step 2: Calculate ready time adjustment margin of the initial schedule using the second algorithm in Ref. [19]. The inputs are the modified task set . The output is the task ready time adjustment margin M i .

3.
Step 3: Determine ready time offset of the initial schedule using the third algorithm in Ref. [19]. The inputs are the modified task set , the ready time adjustment margin M i , the energy source model E S (B S , D S , W S ), and the supercapacitor initial state V 1 (t = 0) and V 2 (t = 0). The output is the modified schedule T MFIFO defined by task start time S i :

Algorithm 2: MFIFO algorithm
Require: A set of N ready but not scheduled tasks: ; task precedence constraints: T p < T q ; energy source model: E S (B S , D S , W S ); and supercapacitor initial state: V 1 (t = 0) and V 2 (t = 0).
2: Input: task set T and task precedence constraints T p < T q .
3: Output: initial schedule T FIFO and modified task set T E .

4:
Step 2: Calculate ready time adjustment margin of the initial schedule using the second algorithm in Ref. [19].

Simulation setup
The MFIFO algorithm is implemented and evaluated using a simulation setup similar to the one used for the MEDF algorithm [19]. The energy source and energy storage models are exactly the same. The energy consumer model is modified. Each task set has six periodic tasks and each periodic task has five jobs. Therefore, each task set is composed of 30 tasks. The timing and energy parameters of a task are defined in the same way as the one used for the MEDF algorithm, too. The precedence constraints are assigned with controlled randomness. The six periodic tasks are partitioned into three groups. Each group consists of two periodic tasks. For convenience, the six periodic tasks are numbered as {P 1 , P 2 , …, P 6 }. The three groups are then {P 1 , P 2 }, {P 3 , P 4 }, and {P 5 , P 6 }. For each group, a job of the first periodic task is randomly selected as the predecessor of a job randomly selected from the second periodic task. Therefore, three pairs of precedence constraints are assigned for each task set. For example, Figure 4 shows that in the first group {P 1 , P 2 }, the third job T 3 of the first periodic task P 1 is selected as the predecessor of the second job T 7 of the second periodic task P 2 : T 3 < T 7 . The MFIFO algorithm is evaluated in terms of the two metrics used for the MEDF algorithm: deadline miss rate and energy violation rate.

An example
An example is used to illustrate the implementation and evaluation of the MFIFO algorithm. The simulation setup is adopted from Ref. [19], which is used to illustrate the MEDF algorithm implementation and evaluation. The supercapacitor initial state is V 1 (t = 0) = V 2 (t = 0) = 1 V. Two periodic tasks are used to define the task timing and energy constraints. The job T 2 from the first periodic task is selected as the predecessor of the job T 4 from the second periodic task. The precedence constraint is therefore T 2 < T 4 . The effective release time of task T 4 is ER 4 = max(R 4 , R 2 + E 2 ) = 88 s. The effective release times of the other five tasks are their release times. The task characteristics are listed in Table 1 .

T 1 T 2 T 3 T 4 T 5 T 6
Release time (R i ) 0 The FIFO schedule determined using Algorithm 1 is shown in Figure 5 . All the tasks are scheduled for execution at their effective release times. The task T 4 begins execution when its predecessor T 2 completes execution. The precedence constraint is satisfied. All the tasks respect their deadlines. The deadline miss rate is therefore α FIFO = 0. The supercapacitor terminal voltage profile is shown in Figure 6. Two energy violations occur: T 1 and T 5 . The minimum supercapacitor terminal voltages during the executions of the two tasks are 0.9670 and 0.9867 V, respectively. The energy violation rate is therefore β FIFO = 2/6 = 0.333.  The task ready time adjustment margin and task ready time offset results are listed in Tables 2 and 3, respectively. The task start time is then determined, and the MFIFO schedule is finalized. The MFIFO schedule is shown in Figure 7. Tasks T 1 and T 5 are postponed for execution. All the deadlines are respected. Therefore, the deadline miss rate is still α MFIFO = 0. The MFIFO and FIFO algorithms have the same timing performance. The supercapacitor terminal voltage profile is shown in Figure 8. No energy violation occurs. The energy violation rate is β MFIFO = 0. This example demonstrates that the MFIFO algorithm is better than the FIFO algorithm in terms of energy performance while maintaining the same timing performance.

Evaluation results
The simulations are run for 200 times using the setup specified in Ref. [19]. The deadline miss rates and energy violation rates are recorded for the FIFO and MFIFO schedules. The obtained evaluation metrics are sorted in the ascending order and plotted. As shown in Figure 9 , 35 out of the 200 simulation runs have zero deadline miss rates. The FIFO and MFIFO algorithms always have the same deadline miss rates. The timing and precedence constraints of the FIFO schedules are preserved in the MFIFO schedules. The energy violation rates are shown in Figure 10 . For the FIFO algorithm, 96 out of the 200 simulation runs have an energy violation rate β FIFO = 1. Among the 96 runs, the MFIFO schedules have an energy violation rate less than one for seven runs. Among the other 104 runs, the MFIFO algorithm results in an energy violation rate smaller than that of the FIFO algorithm for 81 runs. All together, the MFIFO schedules result in a smaller energy violation rate for 88 runs and a same energy violation rate for 112 runs. The simulation results verify that the MFIFO algorithm improves the energy performance of the FIFO algorithm and maintains the timing performance at the same time. The simulation setup is slightly modified to quantitatively compare the energy violation rates of the FIFO and MFIFO algorithms. The duty cycles of the six periodic tasks take the same value for each utilization. The utilization is U = 6 * DC, where DC is the duty cycle. The duty cycle increases from 0.02 to 0.1 with a step of 0.02. The utilization is swept from 0.12 to 0.6 with a step of 0.12. The other parameters of the tasks including periods, phases, weights, and precedence constraints are still defined using the setup specified in Ref. [19]. The simulations are run for 30 times for each utilization. Figure 11 shows the calculated mean absolute percentage error (MAPE) values for the different utilizations. The MAPE decreases as the utilization increases. The average MAPE for the five utilizations is 12.1%. The MFIFO algorithm reduces the average energy violation rate of the FIFO algorithm by 12.1%. The MAPE is 25% for utilization U = 0.12. Like the MEDF algorithm, the MFIFO algorithm improves the energy violation rate more significantly if the sensor node operates with a relatively low duty cycle.

Conclusion
This chapter proposes the MFIFO algorithm for nonpreemptable tasks with precedence constraints. The task precedence constraints are transformed into timing constraints by defining the effective release time of a task. The MFIFO algorithm takes into account the energy constraints of tasks in addition to the timing constraints. The MFIFO algorithm is implemented and evaluated. Simulation results show that the MFIFO algorithm improves the energy performance of the FIFO algorithm and maintains the timing performance at the same time.