|
Algorithm 2. Transition procedure for four energy modes |
-
Input:
Average predicted harvested energy: Ep(t), device consuming energy: Ec(t), residual energy level of the battery: Pt, maximum battery capacity: Pmax, luminous intensity of the sunlight: Lsun, luminous threshold: Lthreshold
|
|
Output: Working mode of the node |
|
while True |
| Delay TDelay; |
| Acquire Ep(t), Ec(t) and Lsun; |
| if Ep(t) ≥ Ec(t)
|
| if Pt
< Pmax
|
| Mode: Sufficient status (SS); |
| else
|
| Mode: Redundant status (RS); |
| end if
|
| else
|
| if Lsun≥ Lthreshold
|
| Mode: Lack status (LS); |
| else
|
| Mode: Empty status (ES)
|
| end if
|
| end if
|
| end while |