Skip to main content
. 2016 Jan 4;16(1):53. doi: 10.3390/s16010053
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;
   ifEp(t) ≥ Ec(t)
    ifPt < Pmax
     Mode: Sufficient status (SS);
    else
     Mode: Redundant status (RS);
    end if
   else
    ifLsun≥ Lthreshold
     Mode: Lack status (LS);
    else
     Mode: Empty status (ES)
    end if
   end if
end while