{'fraction_non_alphanumeric': 0.031230791745938825, 'fraction_numerical': 0.006849114590955657, 'mean_word_length': 4.411149825783972, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Transmission with Energy Harvesting Nodes in Fading Wireless Channels: Optimal Policies

Wireless systems comprised of rechargeable nodes have a significantly prolonged lifetime and are sustainable. A distinct characteristic of these systems is the fact that the nodes can harvest energy throughout the duration in which communication takes place. As such, transmission policies of the nodes need to adapt to these harvested energy arrivals. In this paper, we consider optimization of point-to-point data transmission with an energy harvesting transmitter which has a limited battery capacity, communicating in a wireless fading channel. We consider two objectives: maximizing the throughput by a deadline, and minimizing the transmission completion time of the communication session. We optimize these objectives by controlling the time sequence of transmit powers subject to energy storage capacity and causality constraints. We, first, study optimal offline policies. We introduce a directional water-filling algorithm which provides a simple and concise interpretation of the necessary optimality conditions. We show the optimality of an adaptive directional water-filling algorithm for the throughput maximization problem. We solve the transmission completion time minimization problem by utilizing its equivalence to its throughput maximization counterpart. Next, we consider online policies. We use stochastic dynamic programming to solve for the optimal online policy that maximizes the average number of bits delivered by a deadline under stochastic fading and energy arrival processes with causal channel state feedback. We also propose near-optimal policies with reduced complexity, and numerically study their performances along with the performances of the offline and online optimal policies under various different configurations.


I. INTRODUCTION
This paper considers wireless communication using energy harvesting transmitters. In such a scenario, incremental energy is harvested by the transmitter during the course of data transmission from random energy sources. As such, energy becomes available for packet transmission at random times and in random amounts. In addition, the wireless communication channel fluctuates randomly due to fading. These together lead to a need for designing new transmission strategies that can best take advantage of and adapt to the random energy arrivals as well as channel variations in time.
The simplest system model for which this setting leads to new design insights is a wireless link with a rechargeable transmitter, which we consider here. The incoming energy can be stored in the battery of the rechargeable transmitter for future use. However, this battery has finite storage capacity and the transmission policy needs to guarantee that there is sufficient battery space for each energy arrival, otherwise incoming energy cannot be saved and will be wasted. In this setting, we find optimal offline and online transmission schemes that adapt the instantaneous transmit power to the variations in the energy and fade levels.
There has been recent research effort on understanding data transmission with an energy harvesting transmitter that has a rechargeable battery [1]- [7]. In [1], data transmission with energy harvesting sensors is considered, and the optimal online policy for controlling admissions into the data buffer is derived using a dynamic programming framework. In [2], energy management policies which stabilize the data queue are proposed for single-user communication and under a linear approximation, some delay optimality properties are derived. In [3], the optimality of a variant of the back pressure algorithm using energy queues is shown. In [4], throughput optimal energy allocation is studied for energy harvesting systems in a time constrained slotted setting. In [5], [6], minimization of the transmission completion time is considered in an energy harvesting system and the optimal solution is obtained using a geometric framework similar to the calculus approach presented in [8]. In [7], energy harvesting transmitters with batteries of finite energy storage capacity are considered and the problem of throughput maximization by a deadline is solved in a static channel.
An earlier line of research considered the problem of energy management in communications satellites [9], [10]. In [9], various energy allocation problems in solar powered communication satellites are solved using dynamic programming. In [10], optimal energy allocation to a fixed number of time slots is derived under time-varying channel gains and with offline and online knowledge of the channel state at the transmitter. Another related line of research considered energy minimal transmission problems with deadline constraints [8], [11]- [13]. Our work provides optimal transmission policies to maximize the throughput and minimize the transmission completion time, under channel fluctuations and energy variations, in a continuous time model, generalizing these related works, [4]- [8], [10]- [13], from various different perspectives.
In particular, we consider two related optimization problems. The first problem is the maximization of the number of bits (or throughput) transmitted by a deadline T . The second problem is the minimization of the time (or delay) by which the transmission of B bits is completed.
We solve the first problem under deterministic (offline) and stochastic (online) settings, and we solve the second problem in the deterministic setting. We start the analysis by considering the first problem in a static channel under offline knowledge. The solution calls for a new algorithm, termed directional water-filling. Taking into account the causality constraints on the energy usage, i.e., the energy can be saved and used in the future, the algorithm allows energy flow only to the right. In the algorithmic implementation of the solution, we utilize right permeable taps at each energy arrival point. This solution serves as a building block for the fading case. Specifically, we show that a directional water-filling algorithm that adapts to both energy arrivals and channel fade levels is optimal. Next, we consider the second problem, i.e., the minimization of the time by which transmission of B bits is completed. We use the solution of the first problem to solve this second problem. This is accomplished by mapping the first problem to the second problem by means of the maximum departure curve. This completes the identification of the optimal offline policies in the fading channel.
Next, we set out to find online policies. We address online scheduling for maximum throughput by the deadline T in a setting where fading level changes and energy arrives as random processes in time. Assuming statistical knowledge and causal information of the energy and fading variations, we solve for the optimal online power policy by using continuous time stochastic dynamic programming [13], [14]. To reduce the complexity required by the dynamic programming solution, we propose simple online algorithms that perform near-optimal. Finally, we provide a thorough numerical study of the proposed algorithms under various system settings.

II. SYSTEM MODEL
We consider a single-user fading channel with additive Gaussian noise and causal channel state information (CSI) feedback as shown in Fig. 1. The transmitter has two queues, the data queue where data packets are stored, and an energy queue where the arriving (harvested) energy is stored. The energy queue, i.e., the battery, can store at most E max units of energy, which is used only for transmission, i.e., energy required for processing is not considered.
The received signal y is given by y = √ hx + n, where h is the (squared) fading, x is the channel input, and n is a Gaussian random noise with zero-mean and unit-variance. Whenever an input signal x is transmitted with power p in an epoch of duration L, L 2 log (1 + hp) bits of data is served out from the backlog with the cost of Lp units of energy depletion from the energy queue. This follows from the Gaussian channel capacity formula. The bandwidth is sufficiently wide so that L can take small values and we approximate the slotted system to a continuous time system. Hence, we say that if at time t the transmit power of the signal is x 2 (t) = p(t), the instantaneous rate r(t) in bits per channel use is Following a model similar to [12], we assume that the fading level h and energy arrivals are stochastic processes in time that are marked by Poisson counting processes with rates λ h and λ e , respectively. Therefore, changes in fading level and energy arrivals occur in countable time instants, which are indexed respectively as t f 1 , t f 2 , . . . , t f n , . . . and t e 1 , t e 2 , . . . , t e n , . . . with the convention that t e 1 = t f 1 = 0. By the Poisson property, the inter-occurrence times t f i − t f i−1 and t e j − t e j−1 are exponentially distributed with means 1/λ f and 1/λ e , respectively. The fading level completely define the events that take place during the course of data transmission. This model is shown in Fig. 2 the transmitter is allowed to use the battery energy only. Accordingly, we assume E i ≤ E max for all i as otherwise excess energy cannot be accommodated in the battery anyway.
In the sequel, we will refer to a change in the channel fading level or in the energy level as an and {h j } such that t e i < t and t f j < t are known perfectly by the transmitter. A power management policy is denoted as p(t) for t ∈ [0, T ]. There are two constraints on p(t), due to energy arrivals at random times and also due to finite battery storage capacity. Since energy that has not arrived yet cannot be used at the current time, there is a causality constraint on the power management policy as: where the limit of the integral t e i should be interpreted as t i e − ǫ, for small enough ǫ. Moreover, due to the finite battery storage capacity, we need to make sure that energy level in the battery never exceeds E max . Since energy arrives at certain time points, it is sufficient to ensure that the energy level in the battery never exceeds E max at the times of energy arrivals. Let d(t) = We emphasize that our system model is continuous rather than slotted. In slotted models, e.g., [3], [4], [9], the energy input-output relationship is written for an entire slot. Such models allow energies larger than E max to enter the battery and be used for transmission in a given single slot. Our continuous system model prohibits such occurrences.
Our ultimate goal is to develop an online algorithm that determines the transmit power as a function of time using the causal knowledge of the system, e.g., the instantaneous energy state and fading CSI. We will start our development by considering the optimal offline policy.

III. MAXIMIZING THROUGHPUT IN A STATIC CHANNEL
In this section, we consider maximizing the number of bits delivered by a deadline T , in a nonfading channel with offline knowledge of energy arrivals which occur at times {t 1 , t 2 , . . . , t N } in There are a total of N + 1 epochs. The optimization is subject to causality constraints on the harvested energy, and the finite storage constraint on the rechargeable battery.
This problem was solved in [7] using a geometric framework. Here, we provide the formulation for completeness and provide an alternative algorithmic solution which will serve as the building block for the solution for the fading channel presented in the next section.
First, we note that the transmit power must be kept constant in each epoch [5]- [7], due to the concavity of rate in power. Let us denote the power in epoch i by p i . The causality constraints in (2) reduce to the following constraints on p i , Moreover, since the energy level in the battery is the highest at instants when energy arrives, the battery capacity constraints in (3) reduce to a countable number of constraints, as follows Note that since E 0 > 0, there is no incentive to make p i = 0 for any i. Hence, p i > 0 is necessary for optimality.
The optimization problem is: We note that the constraint in (7) must be satisfied with equality for ℓ = N + 1, otherwise, we can always increase some p i without conflicting any other constraints, increasing the resulting number of bits transmitted.
Note that the objective function in (6) is concave in the vector of powers since it is a sum of log functions, which are concave themselves. In addition, the constraint set is convex as it is composed of linear constraints. Hence, the above optimization problem is a convex optimization problem, and has a unique maximizer. We define the following Lagrangian function [15] for any Lagrange multipliers {λ i } are associated with constraints in (7) and {µ i } are associated with (8). Additional complimentary slackness conditions are as follows, In (10), j = N + 1 is not included since this constraint is in fact satisfied with equality, because otherwise the objective function can be increased by increasing some p i . Note also that as p i > 0, we did not include any slackness conditions for p i .
We apply the KKT optimality conditions to this Lagrangian to obtain the optimal power levels p * i in terms of the Lagrange multipliers as, and Based on the expression for p * i in terms of the Lagrange multipliers in (12), we have the following observation on the structure of the optimal power allocation scheme.
Theorem 1 When E max = ∞, the optimal power levels is a monotonically increasing sequence: Proof: Since E max = ∞, constraints in (8) are satisfied without equality and µ i = 0 for all i by slackness conditions in (11). From (12), since λ i ≥ 0, optimum p * i are monotonically increasing: The monotonicity in Theorem 1 is a result of the fact that energy may be spread from the current time to the future for optimal operation. Whenever a constraint in (7) is not satisfied with equality, it means that some energy is available for use but is not used in the current epoch and is transferred to future epochs. Hence, the optimal power allocation is such that, if some energy is transferred to future epochs, then the power level must remain the same. However, if the optimal power level changes from epoch i to i + 1, then this change should be in the form of an increase and no energy is transferred for future use. That is, the corresponding constraint in (7) is satisfied with equality.
If E max is finite, then its effect on the optimal power allocation is observed through µ i in (12). In particular, if the constraints in (8) are satisfied without equality, then optimal p * i are still monotonically increasing since µ i = 0. However, as E i ≤ E max for all i, the constraint with the same index in (7) is satisfied without equality whenever a constraint in (8) is satisfied with equality. Therefore, a non-zero µ i and a zero λ i appear in p * i in (12). This implies that the monotonicity of p * i may no longer hold. E max constraint restricts power levels to take the same value in adjacent epochs as it constrains the energy that can be transferred from current epoch to the future epochs. Indeed, from constraints in (8), the energy that can be transferred from current, say the ith, or previous epochs, to future epochs is E max − E i . Hence, the power levels are equalized only to the extent that E max constraint allows.

A. Directional Water-Filling Algorithm
We interpret the observed properties of the optimal power allocation scheme as a directional water-filling scheme. We note that if E units of water (energy) is filled into a rectangle of bottom size L, then the water level is E L . Another key ingredient of the directional water-filling algorithm is the concept of a right permeable tap, which permits transfer of water (energy) only from left to right.
Consider the two epoch system. Assume E max is sufficiently large. If E 0 L 1 > E 1 L 2 , then some energy is transferred from epoch 1 to epoch 2 so that the levels are equalized. This is shown in the top figure in Fig. 3. However, if E 0 L 1 < E 1 L 2 , no energy can flow from right to left. This is due to the causality of energy usage, i.e., energy cannot be used before it is harvested. Therefore, as shown in the middle figure in Fig. 3, the water levels are not equalized. We implement this using right permeable taps, which let water (energy) flow only from left to right.
We note that the finite E max case can be incorporated into the energy-water analogy as a constraint on the amount of energy that can be transferred from the past to the future. If the equalizing water level requires more than E max − E i amount of energy to be transferred, then only E max −E i can be transferred. Because, otherwise, the energy level in the next epoch exceeds E max causing overflow of energy, which results in inefficiencies. More specifically, when the right permeable tap in between the two epochs of the example in bottom figure in Fig. 3 is case, we have causality constraints due to energy arrivals and an E max constraint due to finite battery size. Hence, the optimization problem in this fading case becomes: Note that, as in the non-fading case, the constraint in (14) for ℓ = M + N + 1 must be satisfied with equality, since otherwise, we can always increase one of p i to increase the throughput.
As in the non-fading case, the objective function in (13) is concave and the constraints are convex. The optimization problem has a unique optimal solution. We define the Lagrangian for any λ i , µ i and η i as, It follows that the optimal powers are given by where the water level in epoch i, ν i , is We have the following observation for the fading case.
Theorem 2 When E max = ∞, for any epoch i, the optimum water level ν i is monotonically increasing: ν i+1 ≥ ν i . Moreover, if some energy is transferred from epoch i to i + 1, then Proof: E max = ∞ assumption results in µ i = 0 for all i. From (21), and since λ i ≥ 0, we have  (14) is satisfied without equality. This implies, by slackness conditions in (17), that for those i, we have λ i = 0. Hence, by (21), ν i = ν i+1 . In particular, ν i = ν j for all epochs i and j that are in between two consecutive energy arrivals as there is no wall between these epochs and injected energy freely spreads into these epochs.
As in the non-fading case, the effect of finite E max is observed via the Lagrange multipliers µ i .
In particular, whenever E max constraint is satisfied with equality, the monotonicity of the water level no longer holds. E max constrains the amount of energy that can be transferred from one epoch to the next. Specifically, the transferred energy cannot be larger than E max − E in (i). Note that this constraint is trivially satisfied for those epochs with E in (i) = 0 because E in (i) < E max and hence the water level in between two energy arrivals must be equalized. However, the next water level may be higher or lower depending on the new arriving energy amount.

A. Directional Water-Filling Algorithm
The directional water-filling algorithm in the fading channel requires walls at the points of energy arrival, with right permeable water taps in each wall which allows at most E max amount of water to flow. No walls are required to separate the epochs due to changes in the fading level.
The water levels when each right permeable tap is turned on will be found by the directional water-filling algorithm. Optimal power allocation p * i is then calculated by plugging the resulting water levels into (20). An example run of the algorithm is shown in Fig. 4, for a case of 12 0 water level Fig. 4. Directional water-filling with right permeable taps in a fading channel. epochs. Three energy arrivals occur during the course of the transmission, in addition to the energy available at time t = 0. We observe that the energy level equalizes in epochs 2, 4, 5, while no power is transmitted in epochs 1 and 3, since the channel gains in these epochs are too low (i.e., 1 h i too high). The energy arriving at the beginning of epoch 6 cannot flow left due to causality constraints, which are enforced by right permeable taps, which allow energy flow only to the right. We observe that the energy equalizes between epochs 8 through 12, however, the excess energy in epochs 6 and 7 cannot flow right, due to the E max constraint enforced by the right permeable tap between epochs 7 and 8.

V. TRANSMISSION COMPLETION TIME MINIMIZATION IN FADING CHANNEL
In contrast to the infinite backlog assumption of the previous sections, we now assume that the transmitter has B bits to be communicated to the receiver in the energy harvesting and fading channel setting. Our objective now is to minimize the time necessary to transmit these B bits.
This problem is called the transmission completion time minimization problem. In [5], [6], this problem is formulated and solved for an energy harvesting system in a non-fading environment.
In [7], the problem is solved when there is an E max constraint on the energy buffer (battery) by identifying its connection to its throughput optimization counterpart. Here, our goal is to address this problem in a fading channel, by using the directional water-filling approach we have developed so far.
The transmission completion time minimization problem can be stated as,

A. Maximum Departure Curve
Given a deadline T , define the maximum departure curve D(T ) for a given sequence of energy arrivals and channel fading states as, For the non-differentiable points, assume that at t = t e i , an energy in the amount of E i arrives. There exists a small enough increment from t e i that the water level on the right is higher than the water level on the left. The right permeable taps will not allow this water to flow to left.
Then, the D(T ) will have the following form: Thus, the right derivative of D(T ) at t = t e i , becomes arbitrarily large. Hence, D(T ) is not differentiable at t e i . At t = t f i , the fade level changes from h i to h i+1 . As t is increased, water level decreases unless new energy arrives. The change in the water level is proportional to 1 We can visualize the result of Lemma 1 by considering a few simple examples. As the simplest example, consider the non-fading channel (h = 1) with E 0 units of energy available at the transmitter (i.e., no energy arrivals). Then, the optimal transmission scheme is a constant transmit power scheme, and hence, we have, It is clear that this is a continuous, monotonically increasing function, whose derivative at T = 0 (at the time of energy arrival) is unbounded.
Next, we consider a two epoch case where E 1 arrives at T 1 and fading level is constant (and also h = 1). We assume E 0 and E 1 are both smaller than E max and E 0 + E 1 > E max . After some algebra, D(T ) can shown to be expressed as, In this E max constrained case, the asymptote of D(T ) as T → ∞ is strictly smaller than that in E max = ∞ case.
In the most general case where we have multiple energy arrivals and channel state changes, these basic properties will follow. An example case is shown in Fig. 5. Note that there may be discontinuities in D ′ (T ) due to other reasons than fading level changes and energy arrivals, such as the E max constraint.

B. Solution of the Transmission Completion Time Minimization Problem in a Fading Channel
We now solve the transmission completion time minimization problem stated in (22)

VI. ONLINE TRANSMISSION POLICIES
In this section, we will study scheduling in the given setting with online, i.e., causal, information of the events. In particular, we consider the maximization of the number of bits sent by deadline T given only causal information of the energy arrivals and channel fade levels at the transmitter side as in Fig. 1.
We assume that the energy arrival is a compound Poisson process with a density function f e .
Hence, N e is a Poisson random variable with mean λ e T . The channel fade level is a stochastic process marked with a Poisson process of rate λ f . Thus, N f is Poisson with mean λ f T . The channel takes independent values with probability density f h at each marked time and remains constant in between two marked points.

A. Optimal Online Policy
The states of the system are fade level h and battery energy e. An online policy is denoted as Therefore, the optimal online policy g * (e, h, t) is such that J(e, h, t = 0) = J g * , i.e., it solves the following problem In order to solve (32), we first consider δ-skeleton of the random processes [13]. For sufficiently small δ, we quantize the time by δ and have the following.
Then, we can recursively solve (33) to obtain g * (e, h, t = kδ) for k = 1, 2, . . . , ⌊ T δ ⌋. This procedure is the dynamic programming solution for continuous time and the outcome is the optimal online policy [13], [14]. After solving for g * (e, h, t), the transmitter records this function as a look-up table and at each time t, it receives feedback h(t), senses the battery energy e(t) and transmits with power g * (e(t), h(t), t).

B. Other Online Policies
Due to the curse of dimensionality inherent in the dynamic programming solution, it is natural to forgo performance in lieu of less complex online policies. In this subsection, we propose several suboptimal transmission policies that can somewhat mimic the offline optimal algorithms while being computationally simpler and requiring less statistical knowledge. In particular, we resort to event-based online policies which react to a change in fading level or an energy arrival.
Whenever an event is detected, the online policy decides on a new power level. Note that the transmission is subject to availability of energy and the E max constraint.

1) Constant Water Level Policy:
The constant water level policy makes online decisions for the transmit power whenever a change in fading level is observed through the causal feedback.
Assuming that the knowledge of the average recharge rate P is available to the transmitter and that fading density f h is known, the policy calculates h 0 that solves the following equation.
Whenever a change in the fading level occurs, the policy decides on the following power level If the energy in the battery is nonzero, transmission with p i is allowed, otherwise the transmitter becomes silent.
Note that this power control policy is the same as the capacity achieving power control policy in a stationary fading channel [16] with an average power constraint equal to the average recharge rate. In [2], this policy is proved to be stability optimal in the sense that all data queues with stabilizable arrival rates can be stabilized by policies in this form where the power budget is P − ǫ for some ǫ > 0 sufficiently small. However, for the time constrained setting, this policy is strictly suboptimal as will be verified in the numerical results section. This policy requires the transmitter to know the mean value of the energy arrival process and the full statistics of the channel fading. A channel state information (CSI) feedback is required from the receiver to the transmitter at the times of events only.

2) Energy Adaptive Water-Filling:
Another reduced complexity event-based policy is obtained by adapting the water level to the energy level in each event. Again the fading statistics is assumed to be known. Whenever an event occurs, the policy determines a new power level. In particular, the cutoff fade level h 0 is calculated at each energy arrival time as the solution of the following where E current is the energy level at the time of the event. Then, the transmission power level is determined similarly as This policy requires transmitter to know the fading statistics. A CSI feedback is required from the receiver to the transmitter at the times of changes in the channel state.

3) Time-Energy Adaptive
Then, the transmission power level is determined as

VII. NUMERICAL RESULTS
We consider a fading additive Gaussian channel with bandwidth W where the instantaneous rate is h(t) is the channel SNR, i.e., the actual channel gain divided by the noise power spectral density multiplied by the bandwidth, and p(t) is the transmit power at time t. Bandwidth is chosen as W = 1 MHz for the simulations.
We will examine the deadline constrained throughput performances of the optimal offline policy, optimal online policy, and other proposed sub-optimal online policies. In particular, we compare the optimal performance with the proposed sub-optimal online policies which are based on waterfilling [16]. The proposed sub-optimal online policies use the fading distribution, and react only to the new energy arrivals and fading level changes. These event-based algorithms require less feedback and less computation, however, the fact that they react only to the changes in the fading level and new energy arrivals is a shortcoming of these policies. Since the system is deadline constrained, the policies need to take the remaining time into account yet the proposed policies do not do this optimally. We will simulate these policies under various different settings and we will observe that the proposed sub-optimal policies may perform very well in some cases while not as well in some others.
We perform all simulations for 1000 randomly generated realizations of the channel fade pattern and δ = 0.001 is taken for the calculation of the optimal online policy. The rates of Poisson mark processes for energy arrival and channel fading λ e and λ f are assumed to be 1.
The unit of λ e is J/sec and that of λ f is 1/sec. Hence, the mean value of the density function f e is also the average recharge rate and the mean value of f h is the average fading level. The changes in the fading level occur relatively slowly with respect to the symbol duration.
f e is set as a non-negative uniform random variable with mean P , and as the energy arrival is assumed to be smaller than E max , we have 2P < E max . Selection of the E max constraint is just for illustration. In real life, sensors may have batteries of E max on the order of kJ but the battery feeds all circuits in the system. Here, we assume a fictitious battery that carries energy for only communication purposes. Hence, E max on the order of 1 J will be considered. We will examine different fading distributions f h . In particular, Nakagami distribution with different shape parameter m will be considered. We implement the specified fading by sampling its probability density function with sufficiently large number of points.
In order to assess the performance, we find an upper bound on the performances of the policies by first assuming that the channel fading levels and energy arrivals in the [0, T ] interval are known non-causally, and that the total energy that will arrive in [0, T ] is available at the transmitter at time t = 0. Then, for the water level p w that is obtained by spreading the total energy to the interval [0, T ], with the corresponding fading levels, yield the throughput T ub defined in the following as an upper bound for the average throughput in the [0, T ] interval; here l i denotes the duration of the fade level in the ith epoch. Even the offline optimal policy has a smaller average throughput than T ub as the causality constraint does not allow energies to be spread evenly into the entire interval.
We start with examining the average throughput of the system under Rayleigh fading with SNR= 0 dB and deadline T = 10 sec, E max = 10 J as depicted in Fig. 6. We observe that time-energy adaptive waterfilling policy performs quite close to the optimal online policy in the low recharge rate regime. It can be a viable policy to spread the incoming energy when the recharge rate is low; however, its performance saturates as the recharge rate is increased. In this case the incoming energy cannot be easily accommodated and more and more energy is lost due to overflows. Similar trends can be found in Fig. 7 under very low recharge rate regime in the same setting with only difference being the battery capacity E max = 1 J. Next, we examine the setting with T = 10 sec, E max = 10 J under Nakagami fading of m = 3 (average SNR= 5 dB) and we observe similar performances as in the previous cases. As a common behavior in these settings, energy adaptive water-filling performs poorer with respect to the constant water level and time-energy adaptive water-filling schemes.
Finally, we examine the policies under different deadline constraints and present the plots for Nakagami fading distribution with m = 5 in Fig. 9. A remarkable result is that as the deadline is increased, stability optimal [2] constant water level policy approaches the optimal online policy. We conclude that the time-awareness of the optimal online policy has less and less importance as the deadline constraint becomes looser. We also observe that the throughput of the energy-adaptive waterfilling policy is roughly a constant regardless of the deadline. Moreover, the time-energy adaptive policy performs worse as T is increased because energies are spread to very long intervals rendering the transmit power very small and hence energy accumulates in the battery. This leads to significant energy overflows since the battery capacity is limited, and the performance degrades.

VIII. CONCLUSIONS
We developed optimal energy management schemes for energy harvesting systems operating in fading channels, with finite capacity rechargeable batteries. We considered two related problems under offline knowledge of the events: maximizing the number of bits sent by a deadline, and  minimizing the time it takes to send a given amount of data. We solved the first problem using a directional water-filling approach. We solved the second problem by mapping it to the first problem via the maximum departure curve function. Finally, we solved for throughput optimal policy for the deadline constrained setting under online knowledge of the events using dynamic programming in continuous time. Our numerical results show the performances of these algorithms under offline and online knowledge.