On Maximizing the Throughput of Packet Transmission under Energy Constraints

More and more Internet of Things (IoT) wireless devices have been providing ubiquitous services over the recent years. Since most of these devices are powered by batteries, a fundamental trade-off to be addressed is the depleted energy and the achieved data throughput in wireless data transmission. By exploiting the rate-adaptive capacities of wireless devices, most existing works on energy-efficient data transmission try to design rate-adaptive transmission policies to maximize the amount of transmitted data bits under the energy constraints of devices. Such solutions, however, cannot apply to scenarios where data packets have respective deadlines and only integrally transmitted data packets contribute. Thus, this paper introduces a notion of weighted throughput, which measures how much total value of data packets are successfully and integrally transmitted before their own deadlines. By designing efficient rate-adaptive transmission policies, this paper aims to make the best use of the energy and maximize the weighted throughput. What is more challenging but with practical significance, we consider the fading effect of wireless channels in both offline and online scenarios. In the offline scenario, we develop an optimal algorithm that computes the optimal solution in pseudo-polynomial time, which is the best possible solution as the problem undertaken is NP-hard. In the online scenario, we propose an efficient heuristic algorithm based on optimal properties derived for the optimal offline solution. Simulation results validate the efficiency of the proposed algorithm.


Introduction
In recent years, we have witnessed more and more Internet of Things (IoT) wireless devices providing ubiquitous services in multiple areas [1]. For instance, industrial wireless sensors may be deployed to collect various important and valuable data in time through wireless transmission; smartphones participating in crowdsensing tasks need to transmit various sensed data to a centric platform meeting the delay requirements of different requesters; wireless smart city and smart home sensors may carry out variety of surveillance and monitoring applications which impose different importance and respective deadlines for data packets in wireless communications, etc.
In such applications, data packets could have respective deadlines and diverse values. More importantly, a partially transmitted data packet may contribute nothing. For example, an incompletely transmitted data packet may be considered useless for further processing on the receiver's side; a partially transmitted packet of sensed data may fail to provide the bottom-line quality/quantity for further data analysis. Unfortunately, most of the wireless devices in real applications are powered by capacitated batteries, which might not be able to support the transmission of all data packets in time. The incomplete transmission of data packets severely deteriorates the overall throughput that is actually achieved in wireless data transmission. Thus, we introduce a notion, named weighted throughput, to measure the actual achieved throughput, i.e., the total values (sum weights) of data packets that are integrally/completely transmitted within their respective deadlines. It is natural to maximize weighted throughput in wireless data transmission. Therefore, this paper addresses an important theoretical and practical question arised in such scenario, Can we determine properly a set of data packets for delivery and design an energy-efficient rate scheduling policy to maximize the weighted throughput, i.e., the total value of successfully/integrally transmitted packets, without violating the energy constraint?
Many research efforts in prior works have been invested to address the energy-efficient tradeoffs in green wireless communications [2]. Among them, a viable solution is to exploit the rate-adaptive capacities of wireless devices and improve the efficiency of energy usage by rate scheduling. A series of works have investigated the energy-efficient rate-adaptive scheduling policies under various objectives, e.g., minimizing the energy consumption [3][4][5][6], minimizing the transmission completion time [7][8][9]. Note that all these works assume the energy is sufficient to afford the transmission of all packets, which is usually not true for battery-capacitated wireless devices. Observing this, Fu et al. [10] first design the optimal rate-adaptive scheduling policies to maximize the transmitted data bits before a given deadline with constrained energy in static channel with stable channel states. Then, Ahmed et al. [11] and Fu et al. [10] develop algorithms to maximize the transmitted data bits in fading channels under the energy constraint. Shan et al. [12] consider packets that have individual deadlines and follow FIFO service rule, and they develop the optimal algorithm to maximize the transmitted data bits. Ozel et al. [8] and Wu et al. [13] further consider energy with a certain amount can be dynamically harvested from the environment and develop offline and online competitive algorithms to maximize the data bits transmitted in fading channels. A full review on rate-adaptive scheduling is provided in Section 5. Despite all the efforts above, the throughput-maximization schedules developed in the literature are still limited to maximize the amount of transmitted data bits, which cannot be applied to the practical scenario that multiple packets are waiting for transmission while only integrally and successfully transmitted data packets contribute.
In this paper, we consider an energy-efficient rate scheduling problem over a point-to-point transmission in a fading wireless channel. We aim at designing rate schedules that maximize the weighted throughput of the battery-capacitated transmitter, subject to the integrity constraints of transmitted packets that the packets should be completely transmitted within their respective deadlines.
We use an example as shown in Figure 1 to illustrate the problem undertaken. Assume that there are three data packets J 1 , J 2 and J 3 waiting for delivery in a wireless channel while only an integrally transmitted packet can contribute a value/weight (which indicates its importance). Figure 1a shows the arrival time, deadline, workload and weight of each packet. Suppose that the amount of available energy for packet transmission is 30 units and we adopt a classical rate-power function. Following [14], we set the power function to be E = t 2 t 1 )dt, where h(t) is the fading factor reflecting the fading effect of the channel over time, r(t) is the transmission rate to be determined, E denotes the consumed power, while t 1 and t 2 represent the beginning and ending time of packet transmission. Then, the transmitter cannot afford to deliver all three packets within their respective deadlines according to the results derived in [14]. As shown in Figure 1b, if the fading factor of the channel is a constant h(t) = 1, then we can allocate the transmission rate r(t) = 1 over time, and transmit packets J 2 and J 3 completely during (3,9] by consuming 18 units of energy, which leads to a feasible solution with a weighted throughput of 4. Given the same fading factor, if we set a fixed transmission rate 0.75 over time to successively schedule J 1 and J 3 during (1,9] as shown in Figure 1c, we can obtain another feasible solution with a weighted throughput of 6 while consuming 14.62 units of energy. Apparently, the second schedule is better than the first one. However, if the fading factor of the wireless channel varies over time as that in Figure 1a, the same rate schedule as that in Figure 1c cannot guarantee the timely transmission of J 1 and J 3 since maintaining the transmission rate at 0.75 during (1,5] would cost up to 52.56 units of energy due to the influence of the low fading factor. Thus, we need to design a proper rate schedule, e.g., the one in Figure 1d, to re-enable the schedule proposed in Figure 1c to obtain larger weighted throughput. The above example also reveals the challenges in solving the undertaken problem, • Since it is necessary to determine a subset of packets with high total value for delivery, it is easy to show that computing the optimal solution with maximum weighted throughput is NP-hard by reducing from the traditional knapsack problem. The difficulty mainly lies in the integral choices of packets, which differs from throughput maximization problems addressed in all prior works that aims at maximizing the data bits and admits polynomial-time optimal algorithms. • We need to not only determine properly a subset of packets to be transmitted, but also design the corresponding optimal rate policy at the meantime. These two decisions are correlated because the chosen packets to be transmitted must admit a feasible rate schedule and vice versa.

•
The conflict between the energy constraint and the integrity constraint is strengthened by the unstable fading effect of the channels, which asks for a good trade-off between energy consumption and QoS satisfaction. In this paper, we address these challenges by developing offline and online algorithms to maximize the total value of transmitted packets under energy and integrity constraints. The contributions of this paper are as follows.

•
We develop an optimal algorithm (called DLDP) with pseudo-polynomial running time to maximize the weighted throughput of packets transmitted in fading channels under energy and integrity constraints. As the problem undertaken is NP-hard, our proposed algorithm computes the best possible solution in pseudo-polynomial time. This is the first work theoretically addressing the max-throughput rate scheduling problem with the integrity constraints of transmitted data packets.

•
We also develop an online heuristic algorithm by applying the proposed optimal algorithm DLDP and iteratively computing a local optimal solution. Simulation results validate its efficiency.
The rest of the paper is organized as follows. We introduce the system model and formulate the problem in Section 2. Section 3 presents an optimal pseudo-polynomial time algorithm. Section 4 provides an online heuristic algorithm and conducts the simulations to evaluate its performance. Section 5 reviews the related works. Finally, we conclude the paper in Section 6.

System Model and Problem Formulation
In this section, we will introduce the system model first, and then formulate the problem.

System Model
We consider a point-to-point transmission over a wireless fading channel where a transmitter needs to transmit its data packets to the receiver. Suppose that the transmitter has an amount E of energy available for data transmission. Assume that there are n data packets in the packet set J = {J 1 , J 2 , ..., J n } requesting to be transmitted. For the ith packet J i in J, it can be described by a 4-tuple (r i ,d i ,l i ,v i ), where r i stands for its arrival time, d i refers to its deadline, l i is the workload to be transmitted, and v i is the value to be gained if J i is completely/successfully transmitted. Packet J i is only available for transmission during the time period of (r i , d i ]. Without loss of generality, assume 0 = min 1≤i≤n r i and T = max 1≤i≤n d i . Table 1 summarizes the notations that will be used throughout the paper. data transmission rate specified in time t p(t) energy allocated in time t h(t) fading factor in time t x i a binary variable representing whether a task is chosen or not r it the data amount of J i that is transmitted in time slot t w(t) water level specified in time t E total amount of energy available for data transmission We partition the time interval into time slots, thus the arrival time r i and the departure time d i are integers. Assume that set TS is a set including all time points r i and d i , for all 1 ≤ i ≤ n. Thus, |TS| ≤ 2n. We also assume that workload l i and the value v i of the packets are integers.
Denoted by function L(J) the total load ∑ i:J i ∈J l i and denoted by V(J) the total value ∑ i:J i ∈J v i of packet set J. We assume that the packets with earlier arrival time have no later deadlines, modeling the FIFO schedulers that follow first-in-first-out service rule [14,15], i.e., r i ≤ r j and d i ≤ d k for all i < k.
Following most of prior works [10,16], we assume that each time slot is the minimum time unit for decision, and we use a fading factor h(t) to reflect the fading effect of the channel at time slot t. Thus, h(t) is a piecewise constant function whose value alters only at the beginning of each time slot. During the whole time period (0, T], assuming that there are M pieces in h(t), we denote by h k the value of the kth piece in function h(t) that lasts τ k time.
The relationship between the transmission rate and invested energy in fading channels is defined as follows. The transmission rate r(t) and the transmission power p(t) over time follows typically the concave function below [14], and correspondingly its inverse function is The power allocation over time should satisfy the energy constraint,

Problem Formulation
Now we formulate the throughput-maximization packet transmission problem. We first define variable We then denote r it as the data amount of J i that is transmitted in time slot t. Accrodingly, the transmission rate can be calculated as Then, a feasible schedule should satisfy the time constraints and the integrity constraints over the transmitted packets. That is, a packet is either fully transmitted or not, and if a packet J i is chosen to be transmitted, all l i amount of its load must be completely transmitted in interval (r i , d i ]; Otherwise, no load of J i needs to be transmitted if J i is not chosen. Definition 1 (MTEF problem). The weighted Max-throughput packet Transmission problem with Energy constraint under Fading channels (MTEF problem) can be formulated as: Here, it is important to determine the variables x i , i.e., the set of chosen packets in the schedule. The determination of variable p(t) is also the key to solve the MTEF problem, hence we introduce the concept of water level discussed in prior works [8], Definition 2. The water level w(t) at time slot t is defined to be the value Figure 2 illustrates the concept of the water level. In [8], energy is taken as water and the authors propose a water-filling scheme (as if the water/energy should be filled in a sink with an uneven bottom) to solve the optimization problem addressed in that paper. In intuition, if p(t) units of energy is allocated to time slot t, the resulting water level w(t) at that time would be p(t) plus a constant 1 h(t) , the multiplicative inverse of the fading factor h(t) at time slot t. A further short introduction to the concept of water level can be referred to in the Appendix A.
Usually, the notion of water level is defined for ease of the discussion on the structure of the optimal solution in the literature. For example, there exists a basic property of the water level, which is given in [8], Lemma 1. Given a schedule, suppose that the water level is w(t 1 ) and w(t 2 ) (w.l.o.g., w(t 1 ) > w(t 2 )) at time slots t 1 and t 2 , respectively. If the water level w(t 1 ) can be slightly reduced by moving partial energy allocated at time t 1 to time t 2 without violating the energy constraint and the time constraints of the packets, then such a reallocating strategy would achieve a larger amount of total transmitted workload.
Immediately, we have Since h(t) is a known constant at time slot t, it is clear that the water level w(t) can uniquely determine both the power p(t) and the rate r(t) at that time, making it another key variable we need to decide in our design.

Overview of Our Solutions
In this subsection, for ease of reading, we provide an overview of our solutions. In Section 3, we will design a pseudo-polynomial time algorithm, named DLDP, to compute the optimal solution, which is the best possible as the problem will be proved to be NP-hard. The high level idea of the design is as follows. First, instead of computing the maximum achievable throughput under an energy budget (denoted as OPT) directly, we focus on a reversed version of the problem, i.e., computing the minimum energy (denoted as EOPT) needed to achieve a given total value. Then, we will develop a dynamical programming algorithm to compute the optimal solution of EOPT.
Knowing that how much energy should be spent to achieve a value, we can enumerate the possible values and find how much value can be achieved given an energy budget. Figure 3 is a flowchart showing the idea of our design.
The difficulty mainly lies in computing EOPT, in which both the optimal choices of packets and its corresponding optimal rate policy should be determined. Observing this, we develop an algorithm that consists of two layers of dynamical programming process, to determine the optimal policy and the optimal choices of packets, respectively.
For the determination of optimal rate policy (Section 3.1, the first layer), as the optimal water level is pairwise linear over time, we first give a method to enumerate the possible water level in a block (during which the water level is constant), and then enumerate the shape of the last block to derive the recursive function for computing EOPT(). Note that when we try to enumerate the last block's shape, we need a pre-condition that there exists a feasible schedule fully using the time in the last block. The verification of the binary function I() is actually related to the question whether there exists a chosen subset of packets that can fully occupy the time in the last block, which will be exactly solved in the second layer of the dynamical programming process. For the determination of the optimal choices of packets (Section 3.2, the second layer), we first transform the computation of I() to be an end time minimization problem D(), based on which we can determine whether a chosen subset of packets can be finished exactly at the end of the last block. Then, we give a method to enumerate the choices of packets and derive the recursive function for computing D().
After deriving the recursive function of EOPT() and D(), we can implement the whole algorithm in a bottom-to-up manner to find the optimal min-energy solution EOPT as well as the optimal max-throughput solution OPT.
In Section 4, we further apply the derived optimal offline algorithm and design an online heuristic algorithm by computing a local optimal solution in each decision, which is then validated by simulations to be efficient in maximizing the weighted throughput.

Optimal Algorithm for Offline MTEF
In this section, we consider the offline MTEF problem. We first show that the problem undertaken is NP-hard.

Lemma 2. MTEF problem is NP-hard.
Proof. We show it by reducing from the traditional knapsack problem. In the knapsack problem, there are n items where the i-th item has value v i and size c i , and we need to choose a subset of items with maximum total value without violating an capacity C. Given an instance of knapsack problem, we construct an instance of the MTEF problem as follows. We generate a packet set where the i-th packet has weight v i and workload c i , and each packet has a common arrival time r i = 0 and deadline d i = T. Moreover, we set h(t) = 1 for all time 0 < t ≤ T and the energy budget E = T · (2 C T − 1). Then, it is easy to see that the maximum workload that can be transmitted is T · log(1 + E T ) = C by averaging all E amount of energy over the interval (0, T], according to the concave property of the rate-power function. Accordingly, the optimal solution of MTEF problem should transmit a subset of packets while guaranteeing that their total workload is at most C. Therefore, it is clear that the maximum weighted throughput is achieved if and only if the maximum total value of items chosen in the knapsack problem is found without violating the capacity constraint. This proves the NP-hardness of MTEF problem. Considering the NP-hardness of MTEF problem, we attempt to develop an optimal algorithm that runs in pseudo-polynomial time to compute the optimal solution. The high level idea of design is as follows. In order to address the energy constraint and the integrity constraint, we need to determine the rate scheduling policy and the choices of data packets for delivery. However, these two decisions are correlated with each other and difficult to be fixed simultaneously. Observing this, we attempt to deal with these two kinds of constraints separately in two layers. Thus, we propose a dynamical programming algorithm that consists of two layers of dynamical programming process, referred to as DLDP (Double Layers Dynamical Programming). The first layer enumerates to obtain the optimal distribution of power/rate, mainly dealing with the energy constraint, while the second layer mainly deals with the integrity constraints, i.e., the choices of packets to be transmitted. With correct packets selected by the second layer, the first layer returns the optimal rate schedule with the maximum value gained by transmitting the packets under the energy constraint.
Furthermore, instead of a direct study of the maximum throughput achievable (OPT), we compute the minimum energy consumption needed to achieve a certain total value as follows. Denoted by EOPT(t s , t e , S, V) the minimum energy consumption for transmitting a subset of packets in S with the total value added up at least V in a specific time period (t s , t e ]. Knowing that how much energy should be spent to achieve a value, we can find the maximum value OPT by enumerating the possible values and checking whether the consumed energy satisfies the energy constraint. Thus, we will mainly focus on the computation of EOPT().
We will introduce the two layers of the designed dynamical programming process in Sections 3.1 and 3.2 first, and then combine them together in Section 3.3 to obtain the final algorithm and validate its optimality.

First Layer of DLDP
In this subsection, we introduce the first layer of DLDP designed to determine the optimal rate policy.
Since the optimal rate policy can be determined once the water level at each time slot is found, we start by introducing a basic lemma about the water level [14].

Lemma 3.
For any optimal schedules, if the water level w(t) increases or decreases at time slot t, then t must be an arrival time or a deadline of one or more packets, i.e., t ∈ TS.
According to the lemma above, it is obvious that water level w(t) of the optimal schedule is a piecewise constant function that varies only at time t ∈ TS. Accordingly, we assume that a block in the optimal solution is the longest interval in which the optimal solution keeps at a constant water level. Immediately, we know that the optimal solution is composed of blocks, each with a certain constant water level.
Observing this, we attempt to figure out what does the shape of the optimal solution look like in terms of blocks. Our idea in designing the dynamical programming process here is to enumerate the possible water level of the last block in the optimal solution. Once we found the last block, we can combine it with the solution computed for the remaining intervals (which could be taken as a sub-problem), and then return as the final solution. To achieve it, we need to address two issues, (1) how to enumerate the water level in the last block of the optimal solution considering the possible water level could be any real value, and (2) how to combine the results and return as the final solution.
First, we introduce the method on enumerating the water level of the last block in the optimal solution. Although the water level could be any real value, if the water level stays steady at a certain value w(t) = W in a specific period in the optimal solution, say (t 1 , t 2 ] with t 1 , t 2 ∈ TS, we show that it is possible to restrict it in a candidate set with a finite size. Obviously, the start time t 1 and end time t 2 of the block can be enumerated within O(n 2 ) time since t 1 , t 2 ∈ TS. Furthermore, we have where L is the total load/amount of data transmitted in that interval. Recall that h(t) is piecewise constant. To simplify the calculation, we assume that during (t 1 , t 2 ], the function h(t) is composed of m pieces, from the ath piece to the (a + m − 1)th piece. Thus, Equation (10) can be rewritten as, According to the property above, once the total load transmitted in that block is fixed, we can reversely determine the water level therein. Observing this, we only need to show that the total load transmitted in that interval in the optimal solution can be enumerated. Therefore, in the following discussion, we prove that if the interval (t 1 , t 2 ] is chosen correctly, the total load transmitted in the optimal solution is the total workload of a certain subset of the input packets.

Lemma 4.
In an optimal schedule, if t 1 and t 2 are both time points at which the water level changes, the total load transmitted during (t 1 , t 2 ] must be the total workload of a certain subset of the input packet set.
Proof. We use J (t 1 ,t 2 ] to denote the set of packets that are transmitted during (t 1 , t 2 ]. We only need to show that no packet in J (t 1 ,t 2 ] is partially transmitted in interval (t 1 , t 2 ]. Suppose a certain packet J i ∈ J (t 1 ,t 2 ] is partially transmitted there. W.l.o.g., suppose it starts transmission at t where t ≤ t 1 (the proof for the case that it ends transmission after t 2 is similar), and it also transmits at a timê t ∈ (t 1 , t 2 ]. This implies r i ≤ t ≤ t 1 < d i . According to the prior condition, the water level changes at t 1 . W.l.o.g. we assume that the water level w(t) > w(t 1 ). Thus, applying Lemma 1, we can slightly reduce the water level by moving partial workload of J i at timet to time t 1 . This would reduce the energy consumption by Lemma 1, which contradicts the optimality of the schedule. Hence, all the packets in J (t 1 ,t 2 ] are all completely transmitted during (t 1 , t 2 ]. This proves the lemma. Since the total workload of any subset in J is an integer no greater than L(J), we can enumerate the load transmitted in interval (t 1 , t 2 ] in O(L(J)) time. Therefore, given a total load L and a specific period (t 1 , t 2 ], we can solve Equation (11) and get the value W, which will be denoted by function GW( L, t 1 , t 2 ) for ease of discussion. That is, Now we have a fierce relationship between W and L. Note that although t 1 , t 2 has not shown up in the right side of Equation (12). They play a vital role since they provide a certain period which determines the values h k in that period. By enumerating t 1 , t 2 and L, we could figure out the shape of the last block in the optimal schedule.
The analysis above has provided a method to fix the last block of the optimal solution. Now, we are ready to derive the recursion function of EOPT(t s , t e , S, V). We need to fix the remaining intervals excluding the last block and return the final solution using dynamical programming process. Note that there is no need to make full use of the time in (t s , t e ] during the transmission. . Given a general interval (t s , t e ], suppose that the optimal solution keeps at a steady water level W in the last block, say (t , t e ]. Assume that the total value achieved therein is V and the corresponding transmitted packets are chosen from a set S ⊆ S. Then, the energy consumption in (t , t e ] would be t e dt if the time in that period is fully used to transmit a subset of packets from set S . Thus, as a trick, we use a binary function I(t , t e , S , V , W) (to be determined later) to identify whether there exists a feasible schedule that keeps at a water level W in (t , t e ] and transmits a subset of packets from S with the total value V achieved by fully occupying the time in that period. Accordingly, the energy consumption in the remaining sub-interval (t s , t ] can be returned recursively by function EOPT(t s , t , S\S , V − V ), which transmits packets from the remaining set S\S while achieving a total value V − V . Thus, the total energy consumption in (t s , t e ] could be returned by combining these two parts. Therefore, if I(·) = 1, then the total energy consumption EOPT(t s , t e , S, V) dt. Otherwise, the value is set with EOPT(t s , t e , S, V) = ∞ when I(·) = 0. To simplify the presentation, we useĒ(t , t e , S , V , W) to return value dt if I(·) = 1 and value ∞ otherwise. That is, Note that in the analysis above, the solution to function I(·) is related to the question that which subset of packets should be chosen to be transmitted. We will leave the discussion on such solution in the next subsection.
It remains to show how to divide a packet set S into two sets S and S\S during the recursive process above, considering this may cost exponential computation time. Hence, we observe what is the order of packet transmission in the optimal schedule, which is stated in the following lemma. Proof. Assume that in the optimal schedule, there are two intervals (a 1 , a 2 ] and (a 2 , a 3 ] with a 1 < a 2 < a 3 . Suppose that there are two packets J i , J k with i > k, where a segment of J i is transmitted during (a 1 , a 2 ] and a segment of J k is transmitted during (a 2 , a 3 ]. Then, when swapping the transmission order of the packets in these two segments by transmitting packet J k earlier, though the transmission time of these two packets may change, the transmission process of these two packets will still start at a 1 and end by a 3 . No deadline (or arrival time) constraints of the packets will be violated, because d k ≤ d i and r k ≤ r i stands when i > k. Moreover, swapping the transmitting order will not influence the transmission of segments before or after them. Hence, this proves the feasibility of the swap of two adjacent segments if the packet transmitted in the first segment has later deadline than the second.
With the feasibility of swapping operation above, it is not a harsh task to gather all the segments of the same packet to adjacent time periods by swapping, so that each packet is transmitted in a single piece. Therefore, for any optimal schedule, we can utilize the swapping operation to transform it into another optimal schedule without preemption. Similarly, we can further transform it into a schedule following the FIFO rule. This completes the proof.

Remark 1.
Recall that the water level function w(t) directly determines the power function p(t) and the rate function r(t). The lemma above implies that once all the variants w(t) and x i (indicating which packets are selected) are determined, then by transmitting the selected packets in FIFO order, we can decide how much workload of a packet should be transmitted at any time, i.e., the variables r it . This allows us to focus on the discussion about how to determine the water level as stated above and the packet selection in the next subsection.
We use J a,b to denote the set of packets S = {J i |a ≤ i ≤ b}. Consider the full set S = {J i |1 ≤ i ≤ n} = J 1,n first. Lemma 5 states that the transmission of the optimal schedule follows FIFO rule, thus the first k (an index to be enumerated) packets with lower index in set S is transmitted before other packets. This allows us to partition packet set S into two separate parts by allocating the first k packets into the first part (J 1,k = S\S ) and allocating the others into the second part (S = J k +1,n ). Such partition is unique once k is fixed and will not affect the optimality in calculating EOPT(·). For the general case that S = J 1,k , then we have S = J k +1,k and S\S = J 1,k . Therefore, by numerating the possible values of k and the possible values of W, we have the final recursion function for EOPT(·), as concluded in Theorem 1. Note that to shorten the equation, we present GW(l, t , t e ) as GW(l).
After deriving the recursive function for computing EOPT(·), we present its detailed implementation in Algorithm 1. In the algorithm, we introduce a three-dimensional matrix Eopt.

We use Eopt[i][j]
[k] to denote the minimum energy needed to accomplish packets selected from the set made up of the first i packets which attains a total value j before time TS[k]. The recursion is then implemented in a bottom-to-top manner.
This completes the design for the first layer of DLDP, which determines the water level and correspondingly the rate policy in the optimal solution. Note that it remains to determine the function I(·), which is related to the optimal choices of the packets to be transmitted and will be solved in the second layer of the dynamical programming process in DLDP.

Second Layer of DLDP
After fixing the rate policy, we now determine the optimal integral choices of packets to be transmitted. The answer to it is related to the computation of I(t , t e , S , V , W), which is needed in computingĒ(t , t e , J k +1,k , W) in Theorem 1, where S = J k +1,k . For ease of presentation, we write S = J p,q = {J i |p ≤ i ≤ q} by replacing the indexes of S in the following discussions.
Recall that the binary function I(·) is used to identify whether there exists a feasible schedule that transmits a subset of packets in S at a steady water level W while achieving a total value V in (t , t e ]. In order to give the answer to I(·), we introduce a new function D(t , S , V , W), which denotes the minimum time needed to transmit a subset of packets from S while achieving a total value V with a steady water level W after time t . Thus, if there exists a feasible schedule transmitting a subset of packets from S with the total value V achieved by fully occupying the time in the period (t , t e ], then we have D(·) = t e . It is easy to see that I(·) = 1 if and only if D(·) = t e , and furthermore, I(·) = 0 if and only if D(·) = t e . Therefore, we have transformed the computation of I(·) to the end time minimization problem in computing D(·). Now we focus on the computation of D(·). Since partially transmitted packets contribute nothing, there must exist an optimal schedule that does not partially transmit any packet for the consideration of energy efficiency. Moreover, according to Lemma 5, the chosen packets are transmitted in FIFO order. Thus, we only need to discuss about the possible schedules that transmit packets in FIFO order and does not partially transmit any packet in (t , t e ]. Based on these observations, we introduce the other layer of dynamical programming process and compute D(·) by considering the packets one by one and distinguishing the cases whether a packet is selected or not.
To simplify the expression, we write D(p, q, V) = D(t , {J i |p ≤ i ≤ q}, V, W) where t and W are not shown in the input of D(·). This allows us to focus on the calculation of D(p, q, V). Thus, all the rate schedule mentioned below starts at time t , and during the transmission, the water level stays at a constant value W by default. SA ← {J i |y < i ≤ |J|} 12: for v = 0 to j, t = 1 to k do 13: z ← MAX_VALUE 14: for l = 0 to L(SA) do 15: if I(TS[t], SA, v, GW(l)) = 1 then 16: z ← min{ Denoted by T(a, J k , W) the end time of transmitting J k when it is transmitted immediately after time a while the water level keeps steady at W. Note that such a value can be directly calculated given all known values of l k , h(t) and W by solving the unknown variant x in the equation x a log(h(t)W)dt = l k . Note that if the calculated end time is larger than d k , then we would set T(a, J k , W) = +∞. In the following discussion, we would simplify T(a, J k , W) as T(a, J k ) if no ambiguity arises.
Based on this definition, we can derive a recursive function of D(p, q, V) by distinguishing the cases whether J q is chosen to transmit or not.
Proof. Note that the variants {x p , x p+1 , ..., x q } determine the packets chosen to be transmitted in D(p, q, V). Recall Lemma 5 that there exists an optimal schedule transmitting the packets with FIFO order without preemption. Moreover, the optimal schedule would not partially transmit any packet for energy efficiency. Hence, we just integrally transmit the chosen packets in FIFO order. With such pre-condition, we will call D(p, q − 1, ·) to deal with the packets excluding the last one J q . To derive the recursive function for D(·), we distinguish two cases that x q is 0 or 1.
, there exists a value T(max{r q , DP(p, q − 1, V − v q )}, J q ) that is smaller than D(p, q, V). Then the end time of D(p, q, V) can be reduced by scheduling J q right after time max{r q , D(p, q − 1, V − v q )}, contradicting the optimality of D(p, q, V).
On the other hand, if T(max{r q , D(p, q − 1, V − v q )}, J q ) > D(p, q, V), then the end time used for scheduling packets {J i |p ≤ i ≤ q − 1} while achieving a value V − v q should be at least D(p, q − 1, V − v q ). As a result, the end time used for scheduling packets {J i |p ≤ i ≤ q} while achieving a value V should be at least T(max{r q , D(p, q − 1, V − v q )}. This implies D(p, q, V) ≥ T(max{r q , D(p, q − 1, V − v q )} > D(p, q, V), leading to a contradiction again. Hence, if x q = 1, then D(p, q, V, ) = T(max{r q , D(p, q − 1, V − v q )}, J q ).
Case 2 (x q = 0): On one hand, if D(p, q − 1, V) > D(p, q, V), then the absence of J q in the optimal schedule of D(p, q − 1, V) incurs a larger end time than D(p, q, V), which is impossible.
On the other hand, if D(p, q − 1, V) < D(p, q, V), then the value of D(p, q, V) can be reduced to be D(p, q − 1, V) since x q = 0. Therefore, if x q = 0, then D(p, q, V) = D(p, q − 1, V).
Based on the discussion above, we have the recursive function.
After deriving the recursive function for computing D(·), we present its detailed implementation in Algorithm 2.

Merging Together: The Optimal Algorithm
Combining the results above, we have the final optimal algorithm to compute the minimum energy consumption EOPT(·) needed to achieve a certain total value V. Reversely, the optimal weighted throughput (denoted as OPT) under energy budget E can then be acquired by testing the value V and searching the maximum one that satisfies the energy constraint. That is, Finally, we have the final algorithm DLDP (presented in Algorithm 3) to compute the optimal solution for the MTEF problem. The following theorem concludes the optimality of DLDP and its time complexity.  Proof. The optimality of the algorithm directly follows by the analysis and the correctness of the recursion functions that are derived above. To show the time complexity of the overall algorithm, we analyze the running time of each sub-procedure. In computing D(·), the input includes an index of packets in J, a start time, a given water level W and a value V. Thus, the size for matrix D should be O(n 3 LV) where L is the total load and V is the total value of input packet set J.

Online Heuristic Algorithm for MTEF
In the previous section, we have developed an optimal algorithm with pseudo-polynomial running time for the offline MTEF problem. We note that DLDP returns the best possible solution as the problem undertaken is NP-hard. In this section, we consider the online scenario of the MTEF problem. We will propose an online heuristic algorithm and validate its efficiency by simulations.

Online Heuristic Algorithm
In this subsection, we develop an online algorithm for the online MTEF problem. We note that the optimal algorithm DLDP can return the optimal solution efficiently. Thus, we will adopt it as a building block to compute a local optimal solution and accordingly design an efficient online schedule.
The difficulty in coping with the online problem lies mainly on the absence of future information and the irreversible property of operations over time. On one hand, we need to determine how much energy should be allocated as time goes by. On the other hand, we should decide which subset of packets are chosen to be transmitted. By the concave property of the rate-power function, a high-rate transmission of a packet is more energy consuming than a low-rate transmission that takes a longer time to transmit. Thus, the optimal schedule prefers to start transmission of a packet early from its arrival time until its deadline. The later the transmission of the packet starts, the more energy will be consumed on it. Yet if the transmission starts right at the time packets arrive, it may have to abandon some partially transmitted packets when another packet benefiting more comes afterwards due to the energy constraint. However, this is a potential loss since partial transmission contributes nothing.
Observing this, we introduce the concept of "hesitation" in order to provide an opportunity for the schedule to gather more information before making a decision. Specifically, we wait for a certain number of time slots before another decision is made. Furthermore, we adopt the offline optimal algorithm DLDP as a building block to determine how much energy should be allocated in each decision.
The detailed design of the online algorithm (named HST) is presented in Algorithm 4. When the last round of transmission is done, it will wait for u more time slots to gather a set S of candidate packets for the next round of transmission. One key issue remains to be addressed is to determine how much energy should be distributed into different rounds. In order to provide a critical criterion, we define the local energy efficiency as the value-per-energy LEE = DLDP(S, e) e , where DLDP(S, e) is the maximum value returned by Algorithm DLDP with an input of packet set S and energy budget e.
Then, we find the most efficient oneĒ = arg max e DLDP(S, e) e where e is treated as integer numbers considering the enumeration of a real value e is impractical. Finally, we assignĒ units of energy in the current round of transmission and the algorithm proceeds until no more energy available.

Algorithm 4 HST(u)
Input: J, E, u Output: V 1: Let T r be the beginning time of round r and C r be the end time of the local schedule made in round r. Initially r = 0 and T 0 = C 0 = 0. 2: for i = 1 to |J| and E > 0 do 3: Modify all arrival time of packets in S to be C r + u.  Update E ← E −Ē.

9:
Update T r+1 ← C r + u 10: Update C r+1 to be the end time of the local schedule made by DLDP(S,Ē).

11:
Update r ← r + 1 12: end for 13: return V The key design above is to apply the proposed optimal algorithm DLDP and compute a local optimal solution for the arrived tasks that remain alive. Note that when it runs with the general input of non-FIFO tasks, a local optimal solution can still be computed by DLDP for the arrived tasks since they follow FIFO order. Thus, HST is actually applicable for non-FIFO tasks.

Simulations
In this subsection, we conduct simulations to validate the performance of the proposed online algorithm HST. We implement our simulations by Python 2.7. In the simulations, considering that no prior works have addressed the problem same to our setting, we will compare our online algorithm with two baselines and an algorithm refined from [12], which are listed as follows.
• Greedy, which attempts to transmit all packets from their arrival time to their deadlines without waiting. For each packet that arrives, Greedy will immediately transmit the packet, and increase the transmission rate to the lowest needed in terms of deadlines based on the current schedule. This suggests that Greedy does not abandon packets unless there is not enough energy left. • GreedyDrop, which is a schedule that improves Greedy by actively dropping packets on their arrivals if they have relatively low values. In detail, it abandons a task on its arrvial if its values is smaller than the median value of tasks chosen in the previous transmission. • Truncation, which was originally developed to maximize the transmitted data bit but not the total value of integrally transmitted packets [12]. We modify it and make it work in our scenario by transmitting packets integrally. That is, the packet that was the earliest one executed in the previous transmission will be satisfied first in later transmission.
Recall that our online algorithm HST is actually applicable to the more general non-FIFO tasks. Thus, besides the simulations over FIFO tasks, we will further conduct simulations on non-FIFO tasks to comprehensively validate its performance.

Simulation Results on FIFO Tasks
We introduce the defalt setting of our simulations. We set the energy budget to be E =11,000J. The value of h(t) is generated according to a normal distribution N(0.8, 1). The schedule determines a rate once per second. In the equation r(t) = 1 2 log(1 + h(t)p(t)), the unit of r(t) is KB/S while the unit of p(t) is mW. The number of packets is set as 1500 by default. Packets are generated with their loads randomly sampled from [1,5] and values randomly sampled from [1,10]. The arrival time r i of each packet J i is randomly sampled from [r i−1 , r i−1 + 28] with r 0 = 0 and accordingly the deadline d i is randomly sampled from [max{r i , d i−1 }, max{r i , d i−1 } + 14], which guarantees the FIFO property of the generated task set. To be specific, in the following simulations, we choose u = 4 as the input of HST if not specified. The default settings of parameters are summarized in Table 2. We first evaluate the performance of HST when the number of data packets changes. As shown in Figure 5, Greedy has a good performance when there is less packets, because of its greedy nature when energy is sufficient to transmit them all. Both GreedyDrop and Truncation perform better than Greedy when the number of packets increases. Yet all these three algorithms go to ceilings of gained values because they used up the energy. However, by comparing the ceiling values, we notice that our proposed HST algorithm shows up its advantage when more data packets arrive. We can see that HST is more adaptive to harsh environments where not all data packets can be transmitted. This demonstrates the effectiveness of computing a local optimal solution in the algorithm. Moreover, the total value obtained by HST is much higher than other algorithms, which validates the efficiency of HST on maximizing the weighted throughput. To further validate the performance of HST, we examine the effect of the amount of energy budget E. The energy budget is increased from 3000J to 19000J with a step of 4000. As shown in Figure 6, when E grows, HST still outperforms all other algorithms. This validates that HST is efficient under different amount of energy budget. We further evaluate the performance of HST when the fading factor changes. In this simulation, the fading factors are generated according to a normal distribution N(a, 0.025) where a varies from 0.2 to 1 with a step of 0.2. We can see from Figure 7 that the total values gained by HST and other algorithms increase as the average fading factor a increases. Besides, the total value gained by HST is much higher than that of other algorithms, which validates the efficiency and the robustness of HST again.
We also conduct a simulation to validate the performance of HST when the average value of v i changes. With all other settings the same as the default settings, we change the average value of v i from 2 to 10 with a step of 2. As shown in Figure 8  As parameter u is also an important index of HST, we also examine its influence on the results by varying it in range [1,6]. As shown in Figure 9, the highest total value is achieved at u = 4. When u is too small, e.g., u ∈ [1, 3], each decision is made too early to collect enough information. When u is too high, e.g., 5 or 6, the "hesitation" time is too long, which makes the decision too late to respond to the requests early. In practice, the selection of value u should be tested and we suggest set an intermediate value that is not too large.

Simulation Results on Non-FIFO Tasks
As mentioned before, HST is capable of handling non-FIFO tasks. Thus, we further conduct simulations on non-FIFO tasks to comprehensively evaluate the performance of HST. In this simultion, we will compare our algorithm HST with Greedy and GreedyDrop, considering that the algorithm Truncation is not applicable to non-FIFO tasks. Note that the default settings of the simulations keep the same as the previous ones if not specified. The difference in the generation of non-FIFO tasks is that deadlines are sampled from [r i , r i + 14].
We first evaluate the performance of HST when the number of packets increases. As shown in Figure 10, although the total value gain by HST is reduced when running over non-FIFO tasks, HST still outperforms other algorithms as more packets arrive. Moreover, while other algorithms goes to the ceiling, the total value gained by HST is much higher than that gained by others.
We further examine the effect of the energy budget E. As shown in Figure 11, when E grows, HST still outperforms Greedy and GreedyDrop for non-FIFO tasks.
We also conduct simulations to evaluate the performance under various average values of fading factors on non-FIFO tasks. As shown in Figure 12, the advantage of HST is apparent compared with both Greedy and GreedyDrop when the average fading factor changes.
Besides, we conduct a simulation to examine the influence of the average value of v i . As we can see from Figure 13, the total value gained by different algorithms increases almost linearly as the average value of v i increases. At the same time, HST still outperforms other algorithms extensively when the average value of v i varies.
The simulation results above further validate the efficiency and the the robustness of our online algorithm when running over non-FIFO tasks.

Related Work
We review the related work on energy-efficient rate scheduling problems in this section.
In the past decades, many research works have studied the rate-adaptive transmission policies in terms of different objectives, e.g., minimizing the completion time or minimizing the energy consumption [17,18]. For example, Ozel et al. [7] study the completion-time minimization problem in rate scheduling and develop an optimal rate-adaptive transmission policy. Ozel et al. [8] and Yang et al. [9,19], study the problem with the same objective for energy harvesting devices where energy is dynamically acquired from the environment during the scheduling. For the minimization of energy consumption, Prabhakar et al. [3,4] first formulate the energy minimization problem under the deadline constraints of the packets and provide the optimal offline algorithm, but it only works for packets with a common deadline. More complex models where each packet has a respective deadline are discussed in [20,21], but the optimal algorithm can only deal with situations where inter-arrival times of all considered packets are all identically distributed. Finally, Zafer and Modiano [6] extend the packet model to allow general individual deadlines, where earlier arrived packets have no later deadlines, and they develop the optimal rate schedule towards it.
The algorithms above are developed for data transmissions in static channels. In wireless transmission, the channel state is usually unstable, which means sending the same amount of data may need different amounts of energy cost due to the variation of channel status. Thus, the work in [5] consider the fading effect and develop the rate schedule to minimize the energy cost in fading channels. Uysalbiyikoglu et al. [5] extend the work to allow packets to have different arrival time but a common deadline and offer an optimal rate scheduling algorithm towards it. Inspired by [20], Chen et al. [16] solve the special case where all packets have the same available periods. Eventually, Zafer et al. [14] develop the optimal min-energy rate schedule under fading channels for packets that follow FIFO service rule. Shan et al. [22] further extend the result to packets with arbitrary deadlines. The energy minimization problem for energy harvesting devices is also addressed in [23] and more studies concerning energy harvesting devices can be referred to in survey paper [15].
All the works above assume the energy is enough to afford the transmission of all packets. However, such an assumption is not true anymore for battery-capacitated wireless devices. This leads to research works on maximizing the overal transmission throughput under the energy constraint. Fu et al. [10] first develop the optimal algorithm to maximize the transmitted data bits before a given deadline with constrained energy in the static channel. Shan et al. [12] consider packets that have individual deadlines and follow FIFO service rule, and they develop the optimal algorithm to maximize the transmitted data bits. Ahmed et al. [11] and Fu et al. [10] develop algorithms under fading channels to maximize the transmitted data bits with a given energy budget. Ozel et al. [8] and Wu et al. [13] further consider energy harvesting devices and develop offline and online competitive algorithms to maximize the transmitted data bits under dynamical energy arrivals. All these solutions on maximizing the transmitted data bits, however, cannot be applied to scenarios that data packets may have individual delay constraints and only fully transmitted packet can contribute a value, which is practical in many applications.
Therefore, it is desirable to develop max-throughput packet transmission policies under the energy and integrity constraints that packets are required to be integrally transmitted, which is merely studied. This paper addresses such a problem by designing the optimal algorithm and heuristic algorithms.

Conclusions
For battery-capacitated wireless devices, data packets cannot always be completely transmitted in wireless data communication. Noting that partially transmitted packets may contribute nothing to the overall throughput, we introduce the measure of weighted throughput, i.e., the total value of integrally transmitted data packets. This paper addresses the energy-efficient rate scheduling problem over fading channels to maximize the weighted throughput under the energy constraint. In the offline setting, we design an optimal algorithm that runs in pseudo-polynomial time to maximize the weighted throughput of transmitted packets, which is the best possible solution considering that the problem is NP-hard. In the online scenario, we design an algorithm by calling the derived local optimal solution. Simulation results shows the efficiency of the proposed algorithms in maximizing the throughput. In the further work, it is interesting to investigate effect of energy dynamics to the weighted throughput, e.g., the energy harvesting and wireless charging. It is also worth studying other variants of the problem in the future, e.g., the multiple access scenario.

Conflicts of Interest:
The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision to publish the results.

Appendix A
Introduction to the concept of water level: We give a short introduction to the concept of water level by examining a simple scenario (simplified from [8]) where a transmitter aims to transmit as much data bits as possible using a limited energy E. Since the fading function h(t) is a piecewise constant function, we assume there are m pieces/intervals in the fading function. The length of the lth interval is L l and the energy allocated per time slot in that period is p l . According to Equation (1), the optimization problem under such a simple scenario is formulated as follows,