Optimal Offline and Competitive Online Strategies for Transmitter-Receiver Energy Harvesting
aa r X i v : . [ c s . I T ] O c t Optimal Offline and Competitive Online Strategiesfor Transmitter-Receiver Energy Harvesting
Rushil Nagda, Siddharth Satpathi, Rahul Vaze
Abstract —Transmitter-receiver energy harvesting model isassumed, where both the transmitter and receiver are poweredby random energy source. Given a fixed number of bits, theproblem is to find the optimal transmission power profile at thetransmitter and ON-OFF profile at the receiver to minimizethe transmission time. Structure of the optimal offline strategyis derived together with an optimal offline policy. An onlinepolicy with competitive ratio of strictly less than two is alsoderived.
Index Terms —Energy harvesting, offline algorithm, onlinealgorithm, competitive ratio.
I. I
NTRODUCTION
Extracting energy from nature to power communicationdevices has been an emerging area of research. Startingwith [1], [2], a lot of work has been reported on findingthe capacity, approximate capacity [3], structure of optimalpolicies [4], optimal power transmission profile [5]–[8],competitive online algorithms [9], etc. One thing that iscommon to almost all the prior work is the assumptionthat energy is harvested only at the transmitter while thereceiver has some conventional power source. This is clearlya limitation, however, helped to get some critical insightsinto the problem.In this paper, we broaden the horizon, and study themore general problem when energy harvesting is employedboth at the transmitter and the receiver. The joint (tx-rx)energy harvesting model has not been studied in detail andonly some preliminary results are available, e.g., a constantapproximation to the maximum throughput has been derivedin [10]. This problem is fundamentally different than usingenergy harvesting only at the transmitter, where receiveris always assumed to have energy to receive. The receiverenergy consumption model is binary, since it uses a fixedamount of energy to stay on , and is off otherwise. Sinceuseful transmission happens only when the receiver is on , theproblem is to find jointly optimal decisions about transmitpower and receiver ON-OFF schedule. Under this model,there is an issue of coordination between the transmitterand receiver to implement the joint decisions, however, weignore that currently in the interest to make some analyticalprogress.We study the canonical problem of finding the optimaltransmission power and receiver ON-OFF schedule to min-imize the time required for transmitting a fixed number ofbits. We first consider the offline case, where the energy Rahul Vaze’s research is supported by ITRA grant 13X300. arrivals both at the transmitter and the receiver are assumedto be known non-causally. Even though offline scenariois unrealistic, it still gives some design insights. Then weconsider the more useful online scenario, where both thetransmitter and receiver only have causal information aboutthe energy arrivals. To characterize the performance of anonline algorithm, typically, the metric of competitive ratiois used that is defined as the maximum ratio of profit of theonline and the offline algorithm over all possible inputs.In prior work [5], an optimal offline algorithm has beenderived for the case when energy is harvested only atthe transmitter, which cannot be generalized with energyharvesting at the receiver together with the transmitter. Tounderstand the difficulty, assume that the receiver can be on for a maximum time of T . The policy of [5] startstransmission at time , and power transmission profile isthe one that yields the tightest piecewise linear energyconsumption curve that lies under the energy harvestingcure at all times and touches the energy harvesting curveat end time. With receiver on time constraint, however, thepolicy of [5] may take more than T time and hence maynot be feasible. So, we may have to either delay the start oftransmission and/or keep stopping in-between to accumulatemore energy to transmit with higher power for shorter bursts,such that the total time for which transmitter and receiveris on , is less than T .The contributions of this paper are : • For the offline scenario, we derive the structure ofthe optimal algorithm, and then propose an algorithmthat is shown to satisfy the optimal structure. Thepower profile of the proposed algorithm is fundamen-tally different than the optimal offline algorithm of[5], however, the two algorithms have some commonstructural properties. • For the online scenario, we propose an online algorithmand show that its competitive ratio is strictly less than for any energy arrival inputs. With only energy harvest-ing at the transmitter, a -competitive online algorithmhas been derived in [9]. This result is more general withdifferent proof technique that allows energy harvestingat the receiver.II. S YSTEM M ODEL
The energy arrival instants at transmitter are markedby τ i ’s with energy E i ’s for i ∈ { , , .. } . The totalenergy harvested at the transmitter till time t is given by ( t ) = P i : τ i In an optimal solution to (1) , if p i = 0 , then p i ≥ p j ∀ j < i with i, j ∈ { , ..N } . Proof involves the argument that, if powers are decreasing,then utilizing the concavity of g ( p ) , we can construct anotherstrategy that can send same number of bits in less time. It issimilar to Lemma 1 in [5], however, requires a separate proofbecause, with the receiver on time constraint, the optimalsolution can intermittently have zero transmit powers. Note:For space constraints, proofs are included/omitted dependingon their significance and the non-triviality. Lemma 2. The optimal solution to (1) may not be unique,but there always exists an optimal solution where once trans-mission has started, the receiver remains ‘on’ throughtout,until the transmission is complete. Lemma 2 tells us that there is no need to stop in-between transmission and start again. Without affectingoptimality, the start of the transmission can be delayed sothat transmission power is non-zero throughout. Proof: We construct an optimal solution for which p i > for all i ∈ { , .., N } , i.e., with no breaks in transmission,from any other optimal solution. Let an optimal policy X be characterized by { p , s , N } . Now, if p i = 0 ∀ i , then weare done. Suppose some powers, say p i , p i , ..., p i k = 0 forsome k < N , where i < i < .. < i k . We first look atinstant i .Consider Fig. 1 (a), and a new policy (say Y ) which issame as policy X before time s i − and after time s i +1 .But, it keeps the receiver off for a duration of ( s i +1 − s i ) starting from time s i − (i.e. from s i − to s ′ i = ( s i − + s i +1 − s i ) ) and transmits with power p i − from time s ′ i till s i +1 . Y transmits same amount of bits in sametime as X and also satisfies constraints (2)-(4). So Y isalso an optimal policy. But the receiver off duration in Y , ( s i +1 − s i ) , has been shifted to left.Next, we generate another policy Z from Y by shifting the off duration s ′ i − s i − = ( s i +1 − s i ) to start from epoch s i − upto s ′ i − , s ′ i − − s i − = s ′ i − s i − = ( s i +1 − s i ) ,as shown Fig. 1 (b). p i − is shifted right to start from s ′ i − .Note that Z is also optimal. We continue this process ofshifting the receiver off period to the left to generate newoptimal policies till we reach a policy (say W ) where thereceiver is off for time ( s i +1 − s i ) from s , i.e. from s to s ′ , s ′ − s = ( s i +1 − s i ) , as shown in Fig. 1(c). As W has transmission power from the start time s to s ′ , theeffective start time of W can now be changed to s ′ .We can repeat this procedure for each off period corre-sponding to p i , ..., p i k till the total off period is shiftedo the beginning of transmission. This results in a policywith no zero powers in between, that starts after time s (at s + ( s i +1 − s i ) + .. + ( s i k +1 − s i k ) ) and ends at the sametime s N +1 as policy X . s s i s i − s ′ i s i +1 p i XY (a) s p i XW (c) s ′ s i +1 - s i p i s s i − p i XZ (b) p i s i − s ′ i − s ′ i s i +1 Fig. 1. Illustration of Lemma 2. Receiver off time of ( s j − s i ) isprogressively shifted to left as shown in (a) to (b) to (c). In the subsequent discussion, the optimal solution meansone with no breaks in transmission. Lemma 3. For optimal policy { p , s , N } , s i = τ j for some j , U ( s i ) = E ( s − i ) ∀ i ∈ { , .., N } , and U ( s N +1 ) = E ( s − N +1 ) .Proof: By Lemma 1 and 2, p i = 0 and p i +1 ≥ p i , ∀ ≤ i ≤ N . So, the proof follows similar to Lemma 2,3 in [5].Lemma 3 states that in an optimal solution, the transmis-sion power changes only at energy arrival epochs, and theenergy used is equal to all the energy that has arrived tillthen. It may happen that at some epoch τ k , U ( τ k ) = E ( τ − k ) holds true, but transmission power does not change. Fornotational simplicity, we inculde all such τ k ’s in s , where U ( τ k ) = E ( τ − k ) . Lemma 4. Consider two policies X , { p , s , N } and Y , { e p , e s , N } , which are feasible with respect to energy con-straint (3) , have non-decreasing powers and transmit samenumber of bits in total. If Y is same as X from time s to s N ,but e p = p − α, e p N = p N + β, e s = s − γ, e s N +1 = s N +1 − δ and U ( s N +1 ) = U ( e s N +1 ) , where α, β, γ, δ > , then ( e s N +1 − e s ) > ( s N +1 − s ) . This lemma states that if we take any feasible policy, anddecrease its first power p & increase its last power p N while keeping the same number of transmitted bits, the timeof transmission will increase, while the finish time of thepolicy will reduce. The proof is algebraic using the concavityof g ( p ) , and convexity of g ( p ) /p . Lemma 5. For an optimal policy { p , s , N } , either s N +1 − s = Γ or s = 0 .Proof: We use the method of contradiction. Supposethe optimal policy say X , starts at s > and hastransmission time ( s N +1 − s ) < Γ . We will generateanother policy which has finish time less than that of X ,having transmission time squeezed in between ( s N +1 − s ) and Γ . Consider policy Y ( { e p , e s , N } ) in relation to X ,as defined in Lemma 4. As α , β , δ , γ are all related (byconstraints presented in Lemma 4), choice of one variable(we consider α ) defines Y . By definition of s i ’s, s is the first energy arrival which is on the boundary of energyconstraint (3) i.e. U ( s ) = E ( s − ) and s N is the last epochsatisfying U ( s N ) = E ( s − N ) . Hence, we can choose α > ,such that e p and e p N would be feasible with respect to energyconstraint (3). Note that if s = 0 , then any value of α wouldhave made e p infeasible.From Lemma 4, we know that the transmission time ofpolicy Y is more than that of X , i.e. ( e s N +1 − e s ) > ( s N +1 − s ) . From the hypothesis ( s N +1 − s ) < Γ . Therefore, let ( s N +1 − s ) = Γ − ǫ , with ǫ > . If the chosen value of α is such that γ − δ ≤ ǫ , then ( e s N +1 − e s ) < Γ . If not, thenwe can further reduce α so that γ − δ ≤ ǫ ( α , β , γ , δ beingrelated by continuous functions). Note that, when ǫ = 0 , anychoice of α would make ( e s N +1 − e s ) > Γ . Hence, withthis choice of α , ( s N +1 − s ) < ( e s N +1 − e s ) < Γ holdsand policy Y contradicts the optimality of policy X (asfinish time of Y , e s N +1 = s N +1 − δ < s N +1 from Lemma4). Thus s N +1 − s = Γ if s = 0 in an optimal policy. Theorem 1. A policy { p , s , N } is an optimal solution toProblem 1 if and only if, i = N X i =1 g ( p i )( s i +1 − s i ) = B ; (5) p ≤ p . . . ≤ p N ; (6) s i = τ j for some j, i ∈ { , .., N } and U ( s i ) = E ( s − i ) , ∀ i ∈ { , .., N + 1 } ; (7) s N +1 − s = Γ , if s > or s N +1 ≤ Γ , if s = 0; (8) ∃ s j : s j ∈ s and s j = τ q , (9) where τ q is defined in INIT POLICY of section IV.Proof: The necessity of these conditions is establishedin Lemmas 1-6. For lack of space, sufficiency proof isomitted. IV. O PTIMAL O FFLINE A LGORITHM In this section, we propose an offline algorithm OFF , andshow that it satisfies the sufficiency conditions of Theorem1. Algorithm OFF first finds an initial feasible solution viaINIT POLICY, and then iteratively improves upon it viaPULL BACK. Finally, QUIT produces the output. A. INIT POLICY We find a simple constant power policy that is feasibleand starts as early as possible. Also, we try to make it satisfymost of the sufficient conditions of Theorem 1. Step1: Identify the first energy arrival instant τ n , sothat using E ( τ n ) energy and Γ time, B or more bitscan be transmitted with a constant power (say p c ), i.e. Γ g (cid:18) E ( τ n )Γ (cid:19) ≥ B . Then solve for e Γ , e Γ g (cid:18) E ( τ n ) e Γ (cid:19) = B , p c = E ( τ n ) e Γ . (10) q τ n T start T stop τ q E ( τ n ) τ n T start T stop (b) p c p c E ( τ n ) (a) f Γ f Γ Fig. 2. Figure showing point τ q . T start T stop p l p r τ l τ r p ′ l (a) T start p l τ l (c) T start T stop p l p r τ l τ r (d) T start T stop p l τ l τ ′ r (b) τ ′ r τ ′ l τ r p ′ r p ′ l p ′ r p ′ r p r τ ′ r p ′ l T stop p r τ r p ′ r E ( τ ′− r ) T ′ stop p ′ l T ′ start Fig. 3. Figures showing possible configurations in any iteration of thePULL BACK. The solid line represents the transmission policy in theprevious iteration and dash dotted lines are for the current iteration. Step2: Find the earliest time T start , such that transmissionwith power p c from T start for e Γ time, is feasible withenergy constraint (3). Set T stop = T start + e Γ . Let τ q bethe first epoch where U ( τ q ) = E ( τ − q ) (Fig. 2). Next Lemmashows that point τ q thus found is a ‘good’ starting solution. Lemma 6. In every optimal solution, at energy arrivalepoch τ q defined in INIT POLICY, U ( τ q ) = E ( τ − q ) . Continuing with INIT POLICY, if U ( T stop ) = E ( T − stop ) as shown in Fig. 2(a), then terminate INIT POLICY withconstant power policy p c .Otherwise if U ( T stop ) < E ( T − stop ) , then modify thetransmission after τ q as follows. Set e B = ( T stop − τ q ) g ( p c ) ,which denotes the number of bits left to be sent aftertime τ q . Then apply Algorithm 1 of [5] from time τ q totransmit e B bits in as minimum time as possible withoutconsidering the receiver on time constraint. Update T stop , towhere this policy ends. So, U ( T stop ) = E ( T − stop ) from [5].Since Algorithm 1 [5] is optimal, it takes minimum time( = T stop − τ q ) to transmit e B starting at time τ q . However,using power p c to transmit e B takes ( T start + e Γ − τ q ) time. Hence, T stop ≤ ( T start + e Γ ) . As e Γ ≤ Γ from (10), ( T stop − T start ) ≤ Γ . This shows that solution thus foundusing Algorithm 1 [5], is indeed feasible with receiver timeconstraint (4). Now, output of INIT POLICY is a policy thattransmits at power p c from T start to τ q , and after τ q usesAlgorithm 1 of [5]. B. PULL BACK Now, we describe the iterative subroutine PULL BACKwhose input is policy { p , s , N } output by INIT POLICY. Clearly { p , s , N } satisfies all but structure (8) of Theorem1. So, the main idea of PULL BACK is to increase the trans-mission duration from ( s N +1 − s ) ≤ e Γ , in INIT POLICY,to Γ in order to satisfy (8), while decreasing the finishtime for reaching the optimal solution. To achieve this, weutilize the structure presented in Lemma 4 and iterativelyincrease the last transmission power p N , and decease thefirst transmission power p .Initialize τ l = s , τ r = s N , p l = p , p r = p N , T start = s , T stop = s N +1 . In any iteration, τ l and τ r are assignedto the first and last energy arrival epochs, where U ( τ l ) = E ( τ − l ) and U ( τ r ) = E ( τ − r ) . p l and p r are the constanttransmission powers before τ l and after τ r , respectively.We reuse the notation τ here, because τ l and τ r willoccur at energy arrival epochs from Lemma 3. T start and T stop are the start and finish time of the policy, foundin any iteration. τ l , τ r , p l , p r , T start , T stop get updated to τ ′ l , τ ′ r , p ′ l , p ′ r , T ′ start , T ′ stop over an iteration. In any iteration,only one of τ l or τ r gets updated, i.e., either τ ′ l = τ l or τ ′ r = τ r . Further, PULL BACK ensures that transmissionpowers between τ l and τ r do not get changed over aniteration. Fig. 3 shows the possible updates in an iterationof PULL BACK. Step1, Updation of τ r , p r : Initialize p ′ r = p r and increase p ′ r till it hits the boundary of energy constraint (3), say at ( t ′ r , E ( t ′− r )) as shown in Fig. 3(a). The last epoch where p ′ r hits (3) is set to τ ′ r . So, U ( τ ′ r ) = E ( τ ′− r ) . Set T ′ stop towhere power p ′ r ends. Calculate p ′ l such that decrease in bitstransmitted due to change from p r to p ′ r is compensated byincreasing p l to p ′ l , via g ( p r )( T stop − τ r ) − g ( p ′ r )( T ′ stop − τ ′ r )= g ( p ′ l ) E ( τ ′− l ) p ′ l − g ( p l )( τ l − T start ) . (11)Suppose, p r can be increased till infinity without violating(3), as shown in Fig. 3(b). This happens when there in noenergy arrival between τ r and T stop . In this case, set p ′ r tothe transmission power at τ − r . Set τ ′ r as the epoch where p ′ r starts, and T ′ stop to τ r . Calculate p ′ l similar to (11). Step2, Updation of τ l , p l : If p ′ l obtained from Step1 isfeasible, as shown in Fig. 3(a), set T ′ start = τ l − E ( τ ′− l ) p ′ l , τ ′ l = τ l . Proceed to Step3 . Otherwise, if p ′ l is not feasible,as shown in Fig. 3(c), the changes made to τ ′ r , p ′ r in Step1 are discarded. As shown in Fig. 3 (d), p ′ l is increased from itsvalue in Step1 until it becomes feasible. τ ′ l is set to the firstepoch where U ( τ ′ l ) = E ( τ ′− l ) . Similar to Step1 , calculate p ′ r such that the increase in bits transmitted due to change of p l to p ′ l is compensated, and update T ′ stop accordingly. Set τ ′ r = τ r . Proceed to Step3 . Step3, Termination condition: If T ′ stop − T ′ start ≥ Γ or T ′ start = 0 , then terminate PULL BACK. Otherwise, update τ l , τ r , p l , p r , T start , T stop to τ ′ l , τ ′ r , p ′ l , p ′ r , T ′ start , T ′ stop recep-tively and GOTO Step1 . Lemma 7. Transmission time ( T stop − T start ) monotonicallyincreases over each iteration of PULL BACK. heorem 2. Worst case running time of PULL BACK islinear with respect to the number of energy harvests beforefinish time of INIT POLICY.Proof: Since, in an iteration of PULL BACK, either τ r or τ l updates, the number of iterations is bounded bythe values attained by τ l , plus that of τ r . Initially, τ l ≤ τ q and τ r ≥ τ q . As τ l is non-increasing across iterations, τ l ≤ τ q throughout. Assume that τ r remains ≥ τ q acrossINIT POLICY. Then, both τ l and τ r can at max attain all τ i ’s less than finish time of initial feasible policy. Hence, weare done.Now, it remains to show that τ r ≥ τ q . τ n is defined as thefirst energy arrival epoch with which B or more bits can betransmitted in Γ time and τ q ≤ τ n , by definition. So, when T stop becomes ≤ τ n or τ q , then transmission time, ( T stop − T start ) , should be > Γ . But, in the initial iteration ( T stop − T start ) ≤ Γ and ( T stop − T start ) increases monotonically,from Lemma 7. Hence, PULL BACK will terminate before T stop (and therefore τ r ) decreases beyond τ q . C. QUIT If T ′ start = 0 and T ′ stop − T ′ start ≤ Γ uponPULL BACK’s termination, then PULL BACK’s policy attermination is output. Note that structure (8) holds for thispolicy. Otherwise, if T ′ stop − T ′ start > Γ (which happensfor the first time), then we know that in penultimate step T stop − T start < Γ . Hence, we are looking for a policy thatstarts in [ T start , T ′ start ] and ends in [ T stop , T ′ stop ] , whosetransmission time is equal to Γ . Hence, we solve for x, y (let the solution be ˆ x, ˆ y ), ( τ l − x ) g (cid:18) E ( τ − l ) τ l − x (cid:19) + ( y − τ r ) g E ( T − stop ) y − τ r ! = g ( p l )( τ l − T start ) + g ( p r )( T stop − τ r ) , (12) y − x = Γ . (13)At penultimate iteration, ( x, y ) = ( T start , T stop ) , (12) issatisfied and y − x < Γ . At ( x, y ) = ( T ′ start , T ′ stop ) , as E ( T − stop ) = E ( T ′− stop ) , (12) is satisfied and y − x > Γ .So, there must exist a solution (ˆ x, ˆ y ) to (12), where ˆ x ∈ [ T ′ start , T start ] , ˆ y ∈ [ T ′ stop , T stop ] and ˆ y − ˆ x = Γ , for which,(8) holds. Output with this policy which starts at ˆ x and endsat ˆ y . Theorem 3. The transmission policy proposed by Algorithm OFF is an optimal solution to Problem (1) .Proof: We show that Algorithm OFF satisfies the suf-ficiency conditions of Theorem 1. To begin with, we provethat the power allocations satisfy (6) by induction. First weestablish the base case that INIT POLICY’s output satisfies(6). If INIT POLICY returns the constant power policy p c from time T start to T stop , then clearly the claim holds.Otherwise, INIT POLICY applies Algorithm 1 from [5]with e B = B − g ( p c )( τ q − T start ) bits to transmit aftertime τ q . Algorithm 1 from [5] ensures that transmission powers are non-decreasing after τ q . So we only prove thatthe transmission power p c between time T start and τ q is ≤ to the transmission power just after τ q (say p q ), viacontradiction. Assume that p q < p c . Let transmission with p q end at an epoch τ q ′ , where U ( τ q ′ ) = E ( τ − q ′ ) form [5].The energy consumed between time τ q to τ q ′ with power p c is, p c ( τ q ′ − τ q ) > p q ( τ q ′ − τ q ) ( a ) = ( E ( τ − q ′ ) − E ( τ − q )) , (14)where ( a ) follows from U ( τ q ) = E ( τ − q ) . Further, the maxi-mum amount of energy available for transmission between τ q and τ q ′ is (cid:16) E ( τ − q ′ ) − E ( τ − q ) (cid:17) . By (14), transmission with p c uses more than this energy and therefore it is infeasiblebetween time τ q and τ q ′ . But, by definition of p c , transmis-sion with power p c is feasible till time ( T start + e Γ ) . Also, τ q ′ ≤ T stop by definition of τ q ′ and T stop ≤ ( T start + e Γ ) .So, power p c must be feasible till τ q ′ and we reach acontradiction.Now, we assume that the transmission powers fromPULL BACK are non-decreasing till its n th iteration. There-fore, as transmission powers between τ l and τ r doesnot change over an iteration, powers would remain non-decreasing in the ( n + 1) th iteration if we show that p ′ l < p l and p ′ r > p r . In any iteration, by definition, either τ l or τ r updates. Assume τ l gets updated to τ ′ l , p l to p ′ l , p r to p ′ r and τ r remains same, shown Fig. 3(d) (when τ r updates, theproof follows similarly). Then we are certain that p ′ r > p r by algorithmic steps. So from n th to ( n + 1) th iteration, thenumber of bits transmitted after τ r should decrease. Thus,the number of bits transmitted before τ l must be increasing.This implies p ′ l ≤ p l . Hence, transmission powers by outputby OFF are non-deceasing and it satisfies (6).Now consider structure (9). As τ q is present inINIT POLICY, the only way it cannot be part of the policyin an iteration of PULL BACK is when τ r decreases beyond τ q . But τ r ≥ τ q as shown in Theorem 2. So, the policyoutput by OFF includes τ q . By arguments presented at endof OUIT, we know that OFF satisfies (8). To conclude, OFF satisfies (5)-(9), hence is an optimal algorithm.V. ONLINE ALGORITHMIn this section, we consider solving Problem (1) in themore realistic online scenario, where the transmitter and thereceiver are assumed to have only causal information aboutenergy arrivals. To consider the most general model, eventhe distribution of future energy arrivals is unknown at boththe transmitter and the receiver. Moreover, we do not limitourselves to just one energy arrival at receiver as done forthe offline case. Notation: Let B rem ( t ) and E rem ( t ) denote the remainingnumber of bits and energy left at transmitter at any time t ,respectively for the online algorithm. In place of { p , s , N } for the offline case, we use the notation { l , b , M } to denotean online policy, with identical definitions. T online and T off represent the finish time of the online and the optimal offline r r r τ p E ( τ ) E ( τ ) E ( τ )Γ( r )Γ( r )Γ( r )Γ( r ) E rem ( τ ) p T online T start τ τ Fig. 4. An example for online algorithm. algorithm to Problem (1), respectively. We use the competi-tive ratio as a metric where we say that an online algorithmis r -competitive, if over all possible energy arrivals at thetransmitter and the receiver, the ratio of T online to T off isbounded by r , i.e., max E ( t ) , Γ( t ) ∀ t T online T off ≤ r . Online Algorithm: The algorithm waits till time T start which is the earliest energy arrival at transmitter or timeaddition at receiver such that using the energy E ( T start ) andtime Γ( T start ) , B or more bits can be transmitted, i.e., T start = min t s.t. Γ( t ) g E ( t )Γ( t ) ! ≥ B . (15) Starting at T start , the algorithm transmits with power l ,such that E ( T start ) l g ( l ) = B . After T start , at every τ j , thetransmission power is changed to l j such that E rem ( τ j ) l j g ( l j ) = B rem ( τ j ) . (16)Transmission power is not changed at any time arrival at thereceiver after T start , because there is sufficient receiver timealready available to finish transmission. Example: Fig. 4 shows the output of the proposed onlinealgorithm, (15) is not satisfied at time τ , r , and τ . Attime r , (15) is satisfied and transmission starts with a power l such that at rate g ( l ) , B bits can be sent in E ( r ) /l time. Transmission power changes to l at time τ such that E rem ( τ ) l g ( l ) = B rem ( τ ) , and so on. Lemma 8. The transmission power in the online algorithmis non-decreasing with time.Proof: Combined with proof of Lemma 8. Lemma 9. If power at time t is l , then E ( t ) l g ( l ) ≤ B , ∀ t ∈ [ T start , T online ] , with equality only at t = T start .Proof: It is enough to prove that g ( l i ) l i ≤ B E ( b i ) for i ∈{ , .., M } , because both l i and E ( t ) remains constant in t ∈ [ b i , b i +1 ) . We prove this by induction on i in { , .., M } .With b = T start , the base case follows since at time T start , E ( T start ) l g ( l ) = B . Now, assume g ( l i ) l i ≤ B E ( b i ) to be truefor i = k − , k ∈ { , .., M } . As b k = τ j for some j , l k g ( l k ) = E rem ( b k ) B rem ( b k ) = E rem ( b k − ) − l k − ( b k − b k − ) + E j B rem ( b k − ) − g ( l k − )( b k − b k − ) , ( a ) = l k − g ( l k − ) + E j B rem ( b k − ) γ ( b ) > E ( b k − ) B + E j B = E ( b k ) B . where ( a ) follows from B rem ( b k − ) E rem ( b k − ) = g ( l k − ) l k − and defining γ = (cid:16) − l k − ( b k − b k − ) E rem ( b k − ) (cid:17) < , ( b ) uses induction hypothesisalong with B rem ( b k − ) γ < B . This completes the proof of Lemma 9. From equality ( a ) we can see that g ( l k ) /l k For the online algorithm, T start < T off .Proof: We use Contradiction. Suppose T start ≥ T off .From (15), either T start = τ i for some i and/or T start = r j for some j . Let T start = τ i . Since, the offline algorithm { p , s , N } finishes before T start , the maximum (cumulative)energy utilized by the optimal offline algorithm is at mostthe energy arrived till time T − start . So, P i : p i =0 p i ( s i +1 − s i ) ≤E ( T − start ) = E ( T start ) − E i = E ( T start ) . Similarly, if T start = r j ,then the maximum time for which the receiver can be on is Γ( T − start ) . So, P i : p i =0 ( s i +1 − s i ) ≤ Γ( T − start ) = Γ( T start ) − Γ j = Γ( T start ) .Therefore, the total bits transmitted by the optimal offlinealgorithm { p , s , N } is P Ni =1 , p i =0 g ( p i )( s i +1 − s i ) ( a ) ≤ g P i : p i =0 p i ( s i +1 − s i ) P j : p j =0 ( s j +1 − s j ) ! X j : p j =0 ( s j +1 − s j ) , ( b ) ≤ g (cid:18) E ( T − start )Γ( T − start ) (cid:19) Γ( T − start ) ( c ) < B , (17)where ( a ) follows from Jensen’s inequality since g ( p ) isconcave, ( b ) follows from monotonicity of g ( p ) /p , and ( c ) follows from (15). (17) says that offline policy transmits lessthan B bits and therefore, we arrive at a contradiction. Theorem 4. The proposed online algorithm is -competitive.Proof: Let the online algorithm transmit with power l k at time T − off . Since T start < T off by Lemma 10, l k > . Let b k < T off be the time where transmission starts with power l k . Bydefinition, P Mi = k g ( l i )( b i +1 − b i ) = B rem ( b k ) . From Lemma8, ( b N +1 − b k ) ≤ B rem ( b k ) g ( l k ) = E rem ( b k ) l k ≤ E ( b k ) l k ≤ E ( T − off ) l k . (18)Applying Lemma 9 at time T − off , E ( T − off ) l k g ( l k ) ≤ B a ) ≤ T off g (cid:18) E ( T − off ) T off (cid:19) , (19)where ( a ) holds because the maximum number of bits sentby the optimal offline policy by time T off can be bounded by T off g (cid:18) E ( T − off ) T off (cid:19) due to concavity of g ( p ) . By monotonicityof g ( p ) /p , from (19), it follows that E ( T − off ) l k ≤ T off . Com-bining this with (18), ( b N +1 − b k ) ≤ T off . As b k < T off , wecalculate the competitive ratio as, r = max E ( t ) , Γ( t ) ∀ t T online T off = ( b N +1 − b k ) + b k T off < . Discussion: Theorem 4 is a significant result, since ittells us that the proposed online (causal) algorithm willfinish in at most twice the time an optimal offline algorithmtakes knowing all energy arrivals non-causally. Moreover,the online algorithm is independent of the energy arrivaldistributions both at the transmitter and the receiver, so hasbuilt-in robustness. Also, note that the proof of Theorem 4oes not explicitly require to know the exact structure of theoptimal offline algorithm.R EFERENCES[1] O. Ozel and S. Ulukus, “Achieving AWGN capacity under stochasticenergy harvesting,” IEEE Trans. Inf. Theory , vol. 58, no. 10, pp. 6471–6483, 2012.[2] R. Rajesh, V. Sharma, and P. Viswanath, “Capacity of Gaussianchannels with energy harvesting and processing cost,” IEEE Trans.Inf. Theory , vol. 60, no. 5, pp. 2563–2575, May 2014.[3] Y. Dong, F. Farnia, and A. ¨Ozg¨ur, “Near optimal energy control andapproximate capacity of energy harvesting communication,” arXivpreprint arXiv:1405.1156 , 2014.[4] A. Sinha and P. Chaporkar, “Optimal power allocation for a renewableenergy source,” in Communications (NCC), 2012 National Conferenceon . IEEE, 2012, pp. 1–5.[5] J. Yang and S. Ulukus, “Optimal packet scheduling in an energyharvesting communication system,” IEEE Trans. Commun. , vol. 60,no. 1, pp. 220–230, 2012.[6] O. Ozel, K. Tutuncuoglu, J. Yang, S. Ulukus, and A. Yener, “Trans-mission with energy harvesting nodes in fading wireless channels:Optimal policies,” IEEE J. Sel. Areas Commun. , vol. 29, no. 8, pp.1732–1743, 2011.[7] N. Michelusi, K. Stamatiou, and M. Zorzi, “On optimal transmissionpolicies for energy harvesting devices,” in Information Theory andApplications Workshop (ITA), 2012 . IEEE, 2012, pp. 249–254.[8] R. Vaze and K. Jagannathan, “Finite-horizon optimal transmissionpolicies for energy harvesting sensors,” in International Conferenceon Acoustics, Speech, and Signal Processing (ICASSP) . IEEE, 2014.[9] R. Vaze, “Competitive ratio analysis of online algorithms to minimizedata transmission time in energy harvesting communication system,”in IEEE INFOCOM 2013 , Apr. 2013.[10] J. Doshi and R. Vaze, “Long term throughput and approximate ca-pacity of transmitter-receiver energy harvesting channel with fading,”in to appear in IEEE ICCS 2014to appear in IEEE ICCS 2014