---
abstract: 'Wireless technology enables novel approaches to healthcare, in particular the remote monitoring of vital signs and other parameters indicative of people’s health.  This paper considers a system scenario relevant to such applications, where a smart-phone acts as a data-collecting hub, gathering data from a number of wireless-capable body sensors, and relaying them to a healthcare provider host through standard existing cellular networks.  Delay of critical data and sensors’ energy efficiency are both relevant and conflicting issues.  Therefore, it is important to operate the wireless body-area sensor network at some desired point close to the optimal energy-delay tradeoff curve.  This tradeoff curve is a function of the employed physical-layer protocol: in particular, it depends on the multiple-access scheme and on the coding and modulation schemes available.  In this work, we consider a protocol closely inspired by the widely-used Bluetooth standard.  First, we consider the calculation of the minimum energy function, i.e., the minimum sum energy per symbol that guarantees the stability of all transmission queues in the network.  Then, we apply the general theory developed by Neely to develop a dynamic scheduling policy that approaches the optimal energy-delay tradeoff for the network at hand.  Finally, we examine the queue dynamics and propose a novel policy that adaptively switches between connected and disconnected (sleeping) modes.  We demonstrate that the proposed policy can achieve significant gains in the realistic case where the control “NULL” packets necessary to maintain the connection alive, have a non-zero energy cost, and the data arrival statistics corresponding to the sensed physical process are bursty.' 
author:
- |
    Eric Rebeiz, , Giuseppe Caire, ,\
    and Andreas F. Molisch,  [^1] [^2]
bibliography:
- 'body-area.bib'
title: 'Energy-Delay Tradeoff and Dynamic Sleep Switching for Bluetooth-Like Body-Area Sensor Networks'
---

Introduction {#intro}
============

Wireless Body Area Networks (WBAN) allow wireless connectivity among devices operating within very close proximity to the human body (see [@kohno2008; @surveywban] and references therein).  A commonly proposed architecture for WBAN considers sensors and/or actuators with limited power and buffering capacity, communicating with a body-wearable “local hub” node with significantly larger power, buffering and processing capability.  The local hub acts as the WBAN controller, data fusion center, and gateway for external connectivity.  Smartphones are well suited to serve as such hubs because of their large storage capacity and processing power.  Furthermore, most people already live with one of these phones in their pocket almost continuously, and naturally recharge their batteries for reasons that go beyond medical monitoring.  The connection from the hub to the outside world poses no challenges since it makes use of a Wireless Local Area Network (WLAN) or 3G/LTE cellular data connection, either of which is widely available and provides more than sufficient data rate for the purpose of health monitoring [@Molisch_2005_book].  Therefore, this paper focuses on the WBAN segment of the system, comprised of the sensors and the local hub.  In particular, since the local hub has a large battery and it is easily recharged, we focus on the energy-delay tradeoff of the communication [*from sensors to the hub*]{}, although the WBAN protocol is bi-directional and involves the transmission of control packets also from the hub to the sensors as well. 

The sensing signals of interest for healthcare applications require data rates that range from some tens of bit/s to hundreds of kbit/s, as shown in Table \[table\] (see [@body2]).  The “arrival process” modeling the sensing operations may range from very impulsive to deterministic.  For example, an ElectroEncephaloGraphy (EEG) signal triggered by an epileptic seizure may be silent for a long time and then suddenly produce a very large amount of data within a short time period.  In contrast, an ElectroCardioGraphy (ECG) signal for monitoring of physical activity in obese children [@knowme] produces a steady data rate. 

Given the random, possibly impulsive, nature of the sensor-generated data, the sensor node must be equipped with a transmission queue for local buffering.  The rate and power allocated by the scheduler to the sensor-to-hub link (uplink) must ensure stability of the queue to avoid data loss resulting from buffer overflow.  On the other hand, the energy efficiency of the sensor nodes is critically important since the sensor’s battery may not be easily replaced or recharged.  Minimum energy expenditure subject to queue stability yields the so-called [*minimum energy function*]{} [@Neely-IT07] of the system, defined as the infimum of the sum of the sensors’ average transmit energy per symbol,[^3] subject to stability of all queues.  The transmission delay can be reduced by spending more than the minimum average energy per symbol.  The problem of optimal energy-delay tradeoff was addressed by Berry and Gallager [@Berry-Gallager-IT02] for the single-user case and significantly extended by Neely [@Neely-IT07] to the $K \geq 1$ users case.  In our case, we remark that smartphones have a built-in WBAN capability for short-range communication with other devices, currently based on the Bluetooth protocol [@bluetooth] (a possible rival protocol, IEEE 802.15.6, is in the process of being standardized [@802_15_6_draft]).  Therefore, it is likely that the first generation of such WBAN applications will exploit Bluetooth. 

The main contribution of this paper consists of the application of the theoretical framework of [@Neely-IT07] to a simplified, but realistic, “Bluetooth-like” protocol comprising of a finite number of possible physical layer (PHY) coding and modulation schemes (referred to in the following as [*PHY modes*]{}), each of which is characterized by a fixed data rate and given Packet Error Rate (PER) function of the received SNR.  We start by addressing the calculation of the minimum energy function.  For this problem, we provide an exact solution method based on Lagrangian duality in the case where the PER functions, for each PHY mode, are indicator functions (PER equal to 0 for received SNR above some mode-dependent threshold, and equal to 1 otherwise).  In the general case of smooth PER functions, we propose an achievable upper bound and a lower bound on the minimum energy function.  The upper bound is based on finding an appropriate feasible energy allocation policy, while the lower bound is obtained by finding a piecewise linear upper bound on the effective rate function resulting from the actual (packet error-prone) PHY modes.  Next, we apply the general dynamic scheduling policy of [@Neely-IT07] to the case of a discrete set of non-ideal error-prone PHY modes, and we provide a near-optimal scheduling rule that operates close to the optimum energy-delay tradeoff.  Finally, we observe that in the Bluetooth protocol the polled sensor needs to send NULL packets even when there is no data to transmit, in order to maintain the connection alive.  In practice, these packets require some non-zero energy cost.  Therefore, it may be convenient to release the connection and switch to sleeping mode in the case of a very bursty arrival process.  Based on this observation, we develop a novel improved policy that switches to sleeping mode whenever the power necessary to release the connection and re-establish it at a later time is smaller than the conditionally expected power required to keep the connection alive, given the current system state.  This new policy goes beyond the framework of [@Neely-IT07], and provides significant power savings for practically relevant system parameters. 

The paper is organized as follows.  Section \[bluetooth-like\] defines a protocol closely inspired by Bluetooth, with some necessary simplifications in order to obtain an analytically tractable, yet significant, problem.  In Section \[K-user\], we consider the general case of a piconet comprising $K$ sensors and a hub.  The calculation of the minimum energy function is treated in Section \[min-pow-K\].  In Section \[opt-scheduling\], we apply the near-optimal dynamic scheduling framework of [@Neely-IT07] to our setting, and in Section \[switch\] we discuss the behavior of the scheduling algorithm in the case of bursty arrivals, provide a new dynamic sleep switching policy and demonstrate through numerical examples its gain over the conventional policy that does not switch to sleep mode.  Conclusions are pointed out in Section \[conclusions\]. 

A Bluetooth-like protocol {#bluetooth-like}
=========================

The PHY of the enhanced Bluetooth protocol [@bluetooth] supports 3 data rates.  The [*basic rate*]{} corresponds to a 1Mbps raw data rate using GFSK modulation [@Molisch_2005_book].  The [*enhanced rate*]{} modes use the $\pi/4$-DQPSK and 8-DPSK [@Molisch_2005_book], with Gray bit-labeling, to achieve 2Mbps and 3Mbps of raw data rates.  Since the signal bandwidth is approximately $1$ MHz, these correspond to spectral efficiencies $R_1 = 1, R_2 = 2$ and $R_3 = 3$ bit/s/Hz, respectively.  The Bit Error Rates (BERs) of each of the modulation schemes in Additive White Gaussian Noise (AWGN) are given by the well-known exact or tightly approximated expressions below [@millerdqpsk; @proakis-book]: $$\begin{aligned}
\epsilon_1({{\sf snr}}) &=& Q_{1}(a,b) - \frac{1}{2} \exp\left (-\frac{a^2+b^2}{2}\right )I_{0}(ab) \nonumber\\
\epsilon_2({{\sf snr}}) & \simeq & Q\left ( \sqrt{{{\sf snr}}(2-\sqrt{2})} \right ) \nonumber\\
\epsilon_3({{\sf snr}}) & \simeq & \frac{2}{3}Q \left ( \sqrt{{{\sf snr}}} \left (\sqrt{1+\sin(\pi/8)} - \sqrt{1-\sin(\pi/8)} \right ) \right ) ,\end{aligned}$$ where $\epsilon_i({{\sf snr}})$ denotes the BER for modulation scheme $i$ as a function of the [*received*]{} Signal-to-Noise Ratio (SNR), denoted by ${{\sf snr}}$, $Q_1(a,b)$ and $I_0(ab)$ denote the Marcum function and the zero-order modified Bessel function of the first kind respectively [@proakis-book], and $a$ and $b$ are given by $$\label{ab}
a, b = \sqrt{\frac{{{\sf snr}}}{2}\left (1\pm\sqrt{1-\left (\frac{\sin(2\pi h)}{2\pi h} \right )^2}\right ) },$$ with $h=0.29$.

Data packets consist of an Access Code (AC) that identifies the piconet, a Header (H) with various control information, and payload Data (D).  AC and H are always transmitted using the basic rate, while D can be transmitted using any of the above modulations.  As implemented in most commercial chipsets, we consider hard detection.  Successful reception of the payload data can only occur after AC and H have been decoded successfully.  For a given ${{\sf snr}}$, constant over the transmission of a packet, the probability of successful decoding of the payload data is given by $P_{\rm D}({{\sf snr}}) = P_{{\rm A}_s}({{\sf snr}}) P_{{\rm H}_s}({{\sf snr}}) P_{{\rm D}_s}({{\sf snr}})$, i.e., by the product of the individual probability of success of the three detection phases. 

The AC is composed of 72 bits, 64 of which form a synchronization word with minimum Hamming distance $d_H=14$ between ACs of different piconets.  If the Hamming distance between the detected and the expected synchronization words is not larger than the correlator margin $\rho$, the correlator at the receiving node triggers the reception of the packet; otherwise the packet is discarded.  Thus, $$P_{{\rm A}_s}({{\sf snr}}) = \sum_{k=0}^{\rho}{{64 \choose k} \epsilon_1({{\sf snr}})^k(1-\epsilon_1({{\sf snr}}))^{64-k}}.$$ Notice that $\rho$ is not specified by the standard and can be set by the manufacturer.  In our simulations, we assumed $\rho=6$ [@Zanella-bt-efficiency]. 

The header is composed of 18 bits, each encoded by a $(3,1)$ repetition code.  The probability of a header being successfully decoded is given by $$P_{{\rm H}_s}({{\sf snr}}) =  \left ( (1-\epsilon_1({{\sf snr}}))^3+3\epsilon_1({{\sf snr}})(1-\epsilon_1({{\sf snr}}))^2 \right )^{18}.$$ The header also contains a checksum for error detection, used to verify header integrity after decoding.  The checksum is designed so that the probability of undetected error is sufficiently small, such that we can safely assumed that decoding errors can be revealed with probability 1. 

The payload can either be encoded using a rate 2/3 extended Hamming code or be transmitted uncoded.  In particular, the enhanced rates are uncoded so that $$P_{{\rm D}_s}({{\sf snr}}) = \left ( 1-\epsilon_i({{\sf snr}}) \right )^{B_i},$$ where $i$ is the chosen rate, and $B_i$ is the number of payload bits, as given in Table \[PacketSlots\].  The payload can be transmitted over 1, 3, or 5 time slots.  When more than one time slot is allocated, the protocol overhead (AC and H) is only included in the first time slot.  Therefore, a larger number of slots yields lower relative protocol overhead, but also a larger probability of packet error. 

When a node has nothing to send, but the connection to the piconet is to be maintained, “NULL” control packets are used.  These have AC and H as described above, but contain no payload.  In this case, the probability of successful NULL packet detection is simply given by $P_{\rm NULL}({{\sf snr}}) = P_{{\rm A}_s}({{\sf snr}}) P_{{\rm H}_s}({{\sf snr}})$. The minimum received SNR required to stay connected to the piconet shall be denoted by ${{\sf snr}}_0$. For example, ${{\sf snr}}_0 = 8$ dB yields $P_{\rm NULL}({{\sf snr}}_0) \approx 0.95$.

It is also interesting to notice that the basic rate is not competitive with respect to the two enhanced rates, due to the poor BER performance of non-coherent GFSK.  Therefore, in our results we shall consider only enhanced data rates for the payload.  Fig.  \[PERfig\] shows probability of successful packet detection vs. the received SNR for the enhanced rate modes for different payload lengths.  Bluetooth supports both Asynchronous (ACL) and Synchronous (SCO) types of data transfer.  Correspondingly, different logical link control and transport layers have been defined in the system architecture specification.  In the system considered here, the hub acts as the master of the Bluetooth piconet and polls each sensor according to some scheduling scheme, to be investigated later.  The sensors (slaves) respond with an information packet on the next slot(s).  ACL transfer supports asymmetric transmission rates, flexibility of non-periodic polling, re-transmission and the ability to maintain piconets with several slaves.  Therefore, ACL is better suited for the application in mind.  When a device has an active ACL link, it is said to be in the [*connected state*]{}, and can communicate with the master whenever polled. 

In this work we assume that a connected slave device responds to polls from the master by sending data packets at given power and rate, according to the PHY layer options described before, or NULL control packets if the slave has nothing to send; we emphasize that NULL packets must be received correctly with sufficiently high probability; otherwise the network loses synchronism.  While previous theoretical work [@Berry-Gallager-IT02; @Neely-IT07] assumed that there is no power cost when no data are to be transmitted, the NULL packet transmission does incur a power cost – a fact that we shall specifically take into account in this paper.  As an alternative to NULL packet transmission, a device can be disconnected from the network if it has nothing to send for a long time.  In this case, an (implementation-specific) power cost is incurred in the disconnection and later inquiry, paging and re-connection operations.  In our simulations we have considered a reconnection cost equal to some integer multiple $\tau \geq 1$ of the cost of sending a NULL packet, assuming that the reconnection operation requires $\tau$ NULL control packets to be sent by the sensor (see Section \[switch\]). 

Problem set-up {#K-user}
==============

Consider the system shown in Fig.  \[system1\], with $K$ transmitters (sensors) and one receiver (the local hub).  Time is divided into slots, each of which comprises $N  \approx W_s T_s$ complex symbols (channel uses), where $W_s$ is the slot bandwidth and $T_s$ is the slot duration [@gallager Ch.  8].  Rates are expressed in bit/s/Hz. 

The complex discrete-time base-band equivalent channel model for sensor $k$ transmission is given by $$\label{phy-channel}
{{\bf y}}(t) = \sum_{k=1}^K \sqrt{S_k(t)} {{\bf x}}_k(t) + {{\bf z}}(t),$$ where ${{\bf y}}(t), {{\bf x}}_k(t), {{\bf z}}(t) \in {\mbox{\bb C}}^N$ denote the received signal, the transmit codeword and the AWGN in slot $t$, and where $S_k(t)$ denotes the channel fading state, assumed to be constant in each slot, and changing randomly from slot to slot according to some i.i.d.  process.  This block-fading channel model is motivated by the fact that, in typical WBANs, the coherence time and coherence bandwidth are of the order of $10$ ms and $10$ MHz [@Molisch_et_al_2006_AP; @Stability-of-narrowband; @802_15_6_draft], and thus they are respectively larger than the packet duration and of the signal bandwidth.  Furthermore, a Bluetooth-like protocol makes use of slow frequency hopping [@bluetooth], for which different packets transmitted at sufficiently far apart frequencies undergo independent channel states.  [^4] The average transmit energy per symbol of sensor $k$ in slot $t$ is defined as $$E_k(t) = \frac{1}{N} {\mbox{\bb E}}[\| {{\bf x}}_k(t) \|^2 ],$$ and the AWGN is normalized so that its components are i.i.d.  $\sim {{\cal C}}{{\cal N}}(0,1)$ (complex circularly symmetric Gaussian with unit variance and zero mean).  As in Bluetooth, we consider Time-Division Multiple Access (TDMA) where the hub schedules a single transmitter to be active over any slot $t$. Hence, in the channel model (\[phy-channel\]) the sum over $k$ contains effectively only one term for $k = k(t)$, where $k(t)$ denotes the index of the scheduled transmitter at slot time $t$. Correspondingly, $E_k(t) = 0$ for all $k \neq k(t)$.

For the scheduled sensor $k(t)$, we let $\ell(t)$ and $E_{k(t)}(t)$ denote the PHY mode and the corresponding transmit energy chosen by the scheduling policy, respectively.  Consistent with the Bluetooth-like protocol outlined in Section \[bluetooth-like\], we assume that a finite number $L \geq 1$ of possible PHY modes are available, where each mode $\ell$ is characterized by rate $R_\ell$ and a probability of successful packet detection, function of the received SNR, denoted by $P_\ell({{\sf snr}})$. For example, in the case of Bluetooth, we have $P_\ell({{\sf snr}}) = 
P_{{\rm D}}({{\sf snr}})$ for the corresponding enhanced rate mode and packet length.  The received SNR for sensor $k(t)$ is given by the product ${{\sf snr}}_{k(t)} = E_{k(t)}(t) S_{k(t)}(t)$. Also, we assume that the PHY has an [*idle*]{} mode denoted by $\ell = 0$, with transmission rate $R_0 = 0$ and minimum received SNR equal to some ${{\sf snr}}_0 \geq 0$, that depends on the reliability with which the NULL control packets need to be detected.  Without loss of generality, we assume $R_0 = 0 < R_1 < \cdots  < R_L$. Letting ${{\sf snr}}_0 = 0$, we can consider the ideal case where NULL slots do not incur any power cost, as considered in [@Berry-Gallager-IT02; @Neely-IT07]. 

We define the conditional successful decoding event ${{\cal A}}(\ell, e, s)$ for PHY mode $\ell$ with transmit energy $e$ and channel fading state $s$ as: $$\label{successful} 
{{\cal A}}(\ell, e, s) = 
\left \{ \mbox{successful decoding at slot $t$} | \ell(t) = \ell,  E_{k(t)}(t) = e, S_{k(t)}(t) = s \right \}.$$ By definition, we have $P_\ell(es) = {\mbox{\bb E}}[ 1\{ {{\cal A}}(\ell, e, s) \} ]$.  [^5] The data measured by the $k$-th sensor form an i.i.d.  arrival process $A_k(t)$, with arrival rate ${\mbox{\bb E}}[A_k(t)] = \lambda_k$ bit/s/Hz.  Arrival processes are assumed to be bounded with probability 1, i.e., there exists some constant $A_{\max}$ such that ${\mbox{\bb P}}(A_k(t) \in [0, A_{\max}]) = 1$ for all $k$. Each sensor $k$ has a transmission queue with backlog $Q_k(t)$, also expressed in bit/s/Hz after a suitable normalization.  We assume that some error detection and logical link control mechanism keeps the information bits in the transmit queue for later transmission if a packet error occurs.  Then, the transmission queues evolve according to the stochastic difference equations $$\label{buffer-evo}
Q_k(t+1) = \left [ Q_k(t) -  R_{\ell(t)} \times 1\left \{ {{\cal A}}(\ell(t), E_k(t), S_k(t)) \right \} \times 1\{ k(t) = k \} \right ]_+ + A_k(t),$$ for $k = 1,\ldots, K$, where $[ x]_+ {\stackrel{\Delta}{=}}\max\{x, 0\}$.

By Little’s theorem [@gallager-bertsekas], the average delay for the system in Fig.  \[system1\] is given by $\overline{D}_k = \overline{Q}_k/\lambda_k$, where $\overline{Q}_k = \lim_{t \rightarrow \infty} \frac{1}{t} \sum_{\tau=0}^{t-1} {\mbox{\bb E}}[Q_k(\tau)]$ is the limit of the average queue buffer size.  When $\overline{Q}_k  < \infty$ for all $k$, the queues are said to be [*strongly stable*]{} [@Georgiadis-Neely-Tassiulas-2004].  Under our system assumptions, a necessary and sufficient condition for strong stability is that the average service rate for each sensor $k$ must be larger than its arrival rate, i.e., $$\label{strong-stab}
\liminf_{t \rightarrow \infty} \frac{1}{t} \sum_{\tau =0}^{t-1} {\mbox{\bb E}}\left [ R_{\ell(\tau)} \times 
1\left \{ {{\cal A}}(\ell(\tau), E_k(\tau), S_k(\tau)) \right \} \times 1\{ k(\tau) = k\} \right ] > \lambda_k, \;\;\; \forall \;\; k = 1,\ldots, K.$$ A scheduling policy achieving finite $\overline{Q} = \frac{1}{K} \sum_{k=1}^K \overline{Q}_k$ (i.e., finite average delay) is referred to as a [*stability policy*]{}, and the closure of the convex hull of all arrival rate vectors ${\hbox{\boldmath$\lambda$}}= (\lambda_1, \ldots, \lambda_K)$ such that there exists a stability policy is referred to as the [*stability region*]{}, and it is indicated here by $\Lambda$, consistent with the notation of [@Neely-IT06; @Neely-IT07].[^6]

The average transmit energy per symbol for a policy $\pi(t) = (k(t), \ell(t), E_{k(t)}(t))$ is given by $$\label{average-pow}
\overline{E} = \lim_{t \rightarrow \infty} \frac{1}{t} \sum_{\tau=0}^{t-1} \sum_{k=1}^K {\mbox{\bb E}}\left [ E_k(\tau) \times 1\{ k(\tau) = k\} \right ].$$ The minimum energy function, indicated by $\Phi({\hbox{\boldmath$\lambda$}})$ consistent with [@Neely-IT06; @Neely-IT07], is defined as the minimum average transmit energy per symbol required for stability under the arrival rate vector ${\hbox{\boldmath$\lambda$}}\in \Lambda$. Using [@Neely-IT06 Theorem 1], which can be applied in our case almost verbatim, we have that $\Phi({\hbox{\boldmath$\lambda$}})$ is achieved by a randomized stationary policy, i.e., by a time-invariant random mapping of the channel state vector ${{\bf S}}(t) = (S_1(t), \ldots, S_K(t))$ into a scheduling decision.  Formally, such a policy is defined by the conditional probability distribution $$\label{policy1} 
P_{{{\cal K}}_\pi, {{\cal L}}_\pi, {{\cal E}}_\pi |{{\bf S}}}(k,\ell, e | {{\bf s}})  =  {\mbox{\bb P}}({{\cal K}}_\pi = k, {{\cal L}}_\pi = \ell, {{\cal E}}_\pi = e | {{\bf S}}= {{\bf s}}),$$ where ${{\bf S}}$ denotes the channel state vector, and ${{\cal K}}_\pi, {{\cal L}}_\pi$ and ${{\cal E}}_\pi$ denote random variables defined over $\{1, \ldots, K\}$, $\{0, \ldots, L\}$ and ${\mbox{\bb R}}_+$ (the set of non-negative reals), indicating the index of the scheduled sensor, the index of the selected PHY mode, and the corresponding transmit energy, respectively.  Such a policy works as follows: at given slot time $t$, sensor $k(t)$, is scheduled with PHY mode $\ell(t)$ and transmits with energy $E_{k(t)}(t)$ with probability $P_{{{\cal K}}_\pi, {{\cal L}}_\pi, {{\cal E}}_\pi |{{\bf S}}}(k(t),\ell(t), E_{k(t)}(t) | {{\bf S}}(t))$. In Section \[min-pow-K\] we discuss the calculation of $\Phi({\hbox{\boldmath$\lambda$}})$ for the system at hand. 

More generally, the energy-delay tradeoff region of the system for given arrival rates ${\hbox{\boldmath$\lambda$}}$ is defined as the set of points $(\overline{E}, \overline{D})$ in the energy-delay plane for which there exists a scheduling policy $\pi$ that achieves an average delay $\frac{1}{K} \sum_{k=1}^K \overline{D}_k \leq \overline{D}$ with average energy per symbol equal to $\overline{E}$. The Pareto boundary of this region is the [*optimal energy-delay tradeoff*]{} [@Berry-Gallager-IT02; @Neely-IT07].  In general, the optimal energy-delay tradeoff is a non-increasing convex curve with the horizontal asymptote $\overline{E} \downarrow \Phi({\hbox{\boldmath$\lambda$}})$ as $\overline{D} \rightarrow \infty$. It is known [@Berry-Gallager-IT02; @Neely-IT07] that scheduling policies that depend on the channel state only (i.e., which disregard the queue buffer states) cannot achieve optimal energy-delay tradeoff.  Therefore, as in [@Neely-IT07], we are interested in the class of randomized stationary policies $\pi$, mapping the channel state vector ${{\bf S}}(t)$ and the buffer state vector ${{\bf Q}}(t) = (Q_1(t), \ldots, Q_K(t))$ into a scheduling decision.  Formally, such a policy is defined by the conditional probability distribution $$\label{policy2} 
P_{{{\cal K}}_\pi, {{\cal L}}_\pi, {{\cal E}}_\pi |{{\bf S}}, {{\bf Q}}}(k,\ell, e | {{\bf s}},{{\bf q}})  =  {\mbox{\bb P}}({{\cal K}}_\pi = k, {{\cal L}}_\pi = \ell, {{\cal E}}_\pi = e | {{\bf S}}= {{\bf s}},  {{\bf Q}}= {{\bf q}}),$$ where all random variables are as defined above, and ${{\bf Q}}$ denotes the buffer state vector.  Such a policy works as follows: at given slot time $t$, sensor $k(t)$, is scheduled with PHY mode $\ell(t)$ and transmits with energy $E_{k(t)}(t)$ with probability $P_{{{\cal K}}_\pi, {{\cal L}}_\pi, {{\cal E}}_\pi |{{\bf S}}, {{\bf Q}}}(k(t),\ell(t), E_{k(t)}(t) | {{\bf S}}(t),{{\bf Q}}(t))$. In Section \[opt-scheduling\] we apply the [*dynamic scheduling*]{} framework of [@Neely-IT07] to the system at hand and obtain a family of policies that can operate closely to any desired point of the optimal energy-delay tradeoff curve by appropriately tuning a control parameter. 

Minimum average energy subject to stability constraints {#min-pow-K}
=======================================================

Let ${{\bf S}}= (S_1, \ldots, S_K)$ denote a random vector with the same first order marginal probability cumulative distribution function (cdf) $F_S({{\bf s}})$ of the channel state ${{\bf S}}(t)$. As anticipated before, an underlying system assumption is that the network must be designed in order to guarantee successful reception of the NULL packets with sufficiently high probability.  In practice, in the case of protocol errors, some paging and synchronization mechanism allows to restart operations.  [^7] However, for simplicity, protocol errors are not taken into account and ${{\sf snr}}_0$ is fixed such that the $P_{\rm NULL}({{\sf snr}}_0)$ is sufficiently large.  In particular, in order to guarantee ${{\sf snr}}_{k(t)} \geq {{\sf snr}}_0 > 0$ with probability 1, we assume that $F_S(\cdot)$ is such that ${\mbox{\bb E}}[1/S_k] < \infty$ for all $k$. More details on the channel state cdf used in our numerical results, relevant for the WBAN scenario, is given at the end of this section.  For the rest, the minimum energy calculation discussed here is general, and holds for any continuous, discrete or mixed-type [@grimmett] fading distribution. 

Finding $\Phi({\hbox{\boldmath$\lambda$}})$ consists of solving for the conditional probability distribution (\[policy1\]) such that the corresponding randomized stationary policy minimizes $\overline{E}$ subject to stability of all queues.  It is useful to separate the discrete and continuous parts of the conditional probability distribution (\[policy1\]) as $$P_{{{\cal K}}_\pi, {{\cal L}}_\pi, {{\cal E}}_\pi |{{\bf S}}}(k,\ell, e | {{\bf s}}) = p_{{{\cal E}}_\pi |{{\cal K}}_\pi, {{\cal L}}_\pi, {{\bf S}}}( e | k,\ell,{{\bf s}}) P_{{{\cal K}}_\pi, {{\cal L}}_\pi |{{\bf S}}}(k,\ell | {{\bf s}}).$$ The discrete conditional probability distribution $P_{{{\cal K}}_\pi, {{\cal L}}_\pi |{{\bf S}}}(k,\ell | {{\bf s}})$ is represented by a matrix-valued function ${{\bf W}}({{\bf s}}) \in [0,1]^{K \times (L+1)}$ with $(k,\ell)$ element $w_{k,\ell}({{\bf s}})$, such that $$P_{{{\cal K}}_\pi, {{\cal L}}_\pi |{{\bf S}}}(k,\ell | {{\bf s}}) = w_{k,\ell}({{\bf s}}), \;\;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K.$$ The continuous part corresponds to the energy allocation random variable ${{\cal E}}_{k,\ell}({{\bf s}})$, conditionally distributed according to $p_{{{\cal E}}_\pi |{{\cal K}}_\pi, {{\cal L}}_\pi, {{\bf S}}}( e | k,\ell,{{\bf s}})$. Using the stability condition (\[strong-stab\]), $\Phi({\hbox{\boldmath$\lambda$}})$ is given by the value of the optimization problem $$\begin{aligned}
\mbox{minimize} & &  {\mbox{\bb E}}\left [ \sum_{k,\ell} w_{k,\ell}({{\bf S}}) {{\cal E}}_{k, \ell}({{\bf S}})  \right ] \label{K-user-Phi-smooth} \\
\mbox{subject to} & & {\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) R_\ell \times 1\{ {{\cal A}}(\ell, {{\cal E}}_{k,\ell}({{\bf S}}), S_k) \}   \right ] \geq \lambda_k, \;\;\; \forall \; k = 1,\ldots, K \nonumber \\
& & {{\bf 1}}^{{\sf T}}{{\bf W}}({{\bf s}}) {{\bf 1}}= 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K \nonumber \\
& & {\mbox{\bb P}}( s_k {{\cal E}}_{k,\ell}({{\bf s}}) \geq {{\sf snr}}_0) = 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \;\;\; \ell = 0,\ldots, L, \nonumber \\
& & w_{k,\ell}({{\bf s}}) \geq 0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \;\;\; \ell = 0,\ldots, L,  \nonumber \end{aligned}$$ where ${{\bf 1}}$ denotes the all-one vector, and where the conditional successful decoding event ${{\cal A}}(\ell,e,s)$ is defined in (\[successful\]).  Using iterated expectation, we can write $$\begin{aligned}
 \label{constraint}
{\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) R_\ell \times 1\{ {{\cal A}}(\ell, {{\cal E}}_{k,\ell}({{\bf S}}), S_k) \}   \right ] & = & 
{\mbox{\bb E}}\left [ {\mbox{\bb E}}\left [ \left .  \sum_{\ell} w_{k,\ell}({{\bf S}}) R_\ell \times 1\{ {{\cal A}}(\ell, {{\cal E}}_{k,\ell}({{\bf S}}), S_k) \}  \right | {{\bf S}}, {{\cal E}}_{k,\ell}({{\bf S}}) \right ] \right ] \nonumber \\
& = & 
{\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) R_\ell \times {\mbox{\bb E}}\Big [ \left .  1\{ {{\cal A}}(\ell, {{\cal E}}_{k,\ell}({{\bf S}}), S_k) \}  \right | {{\bf S}}, {{\cal E}}_{k,\ell}({{\bf S}}) \Big ] \right ] \nonumber \\
& = & 
{\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) R_\ell P_\ell ({{\cal E}}_{k,\ell}({{\bf S}}) S_k)  \right ]\end{aligned}$$ Using (\[constraint\]) into the rate constraint in (\[K-user-Phi-smooth\]), we rewrite our problem as $$\begin{aligned}
\mbox{minimize} & &  {\mbox{\bb E}}\left [ \sum_{k,\ell} w_{k,\ell}({{\bf S}}) {{\cal E}}_{k, \ell}({{\bf S}})  \right ] \label{K-user-Phi-smooth1} \\
\mbox{subject to} & & {\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) R_\ell P_\ell ({{\cal E}}_{k,\ell}({{\bf S}}) S_k)   \right ] \geq \lambda_k, \;\;\; \forall \; k = 1,\ldots, K \nonumber \\
& & {{\bf 1}}^{{\sf T}}{{\bf W}}({{\bf s}}) {{\bf 1}}= 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K \nonumber \\
& & {\mbox{\bb P}}( s_k {{\cal E}}_{k,\ell}({{\bf s}}) \geq {{\sf snr}}_0) = 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \;\;\; \ell = 0,\ldots, L, \nonumber \\
& & w_{k,\ell}({{\bf s}}) \geq 0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \;\;\; \ell = 0,\ldots, L.  \nonumber \end{aligned}$$ The form of problem (\[K-user-Phi-smooth1\]) is appealing since the conditional [*effective rate*]{} terms $R_\ell P_\ell ({{\cal E}}_{k,\ell}({{\bf S}}) S_k)$ appearing in (\[constraint\]) coincide with the average “goodput” (product of the transmitter rate times the probability of decoding success) corresponding to each PHY mode $\ell$ with received SNR equal to ${{\cal E}}_{k,\ell}({{\bf S}}) S_k$. For general smooth functions $P_\ell({{\sf snr}})$, finding the optimal stationary policy (i.e., the matrix ${{\bf W}}({{\bf s}})$ and the energy conditional probability distribution $p_{{{\cal E}}_\pi |{{\cal K}}_\pi, {{\cal L}}_\pi, {{\bf S}}}( e | k,\ell,{{\bf s}})$) is not easy.  In fact, using Carathéodory theorem and the approach of [@Neely-IT06], the solution can be given as a convex combination (whose coefficients need to be optimized) of $K + 2$ pairs of matrices $\{{{\bf W}}_j({{\bf s}}), {{\bf E}}_j({{\bf s}}) : j = 1,\ldots, K+2\}$ for each channel state ${{\bf s}}\in {\mbox{\bb R}}^K_+$ where ${{\bf W}}_j({{\bf s}})$ are instances of ${{\bf W}}({{\bf s}})$ and ${{\bf E}}_j({{\bf s}})$ contain instances of the realization of the random variable ${{\cal E}}_{k,\ell}({{\bf s}})$ for all $k, \ell, {{\bf s}}$ (see [@Neely-IT06 Appendix A] for details).  This approach, however, does not lead to a viable computational method since it requires discretizing the channel state space into a sufficiently fine grid of points ${{\cal S}}\subset {\mbox{\bb R}}_+^K$, and solving the corresponding non-convex optimization problem in $2 LK (K+2) |{{\cal S}}|$ variables. 

In order to overcome this difficulty, we propose a method that efficiently finds an achievable sub-optimal solution $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$ and, similarly, a lower bound $\underline{\Phi}({\hbox{\boldmath$\lambda$}}) \leq \Phi({\hbox{\boldmath$\lambda$}})$. The achievable upper bound on the minimum energy function is constructive, and leads to a feasible scheduling policy that achieves stability whenever $\overline{\Phi}({\hbox{\boldmath$\lambda$}}) < \infty$. The lower bound allows us to precisely quantify the loss incurred by the simplified feasible policy.  In order to prove upper bound, lower bound, and an efficient solution method, we need some auxiliary results given below and proved in Appendix \[proofs\]. 

Define the effective rate vs. SNR function $$\label{mu} 
\mu({{\sf snr}}) = \max_{\ell = 0,\ldots, L} \left \{ R_\ell P_\ell({{\sf snr}}) \right \},$$ with domain ${{\sf snr}}\geq {{\sf snr}}_0$. An example of such function is shown in Fig.  \[PERfig-example\], where $\mu({{\sf snr}})$ is plotted vs ${{\sf snr}}$ (in natural scale, not in dB) for the case of ${{\sf snr}}_0 = 8$ dB, $\ell = 1$ and $\ell = 2$ corresponding to the 2dh3 and 3dh3 enhanced data rate modes of Bluetooth with payload length equal to 3 slots, used throughout our numerical results (see Table.  \[PacketSlots\]). 

Let $\overline{\mu}({{\sf snr}})$ denote the upper concave envelope [@horst] of $\mu({{\sf snr}})$, with the same support.  By definition, for all $\ell$, we have $$R_\ell P_\ell ({{\sf snr}}) \leq \mu({{\sf snr}}) \leq \overline{\mu}({{\sf snr}}), \;\;\; \forall \;\; {{\sf snr}}\geq {{\sf snr}}_0.$$ Hence, a relaxation of problem (\[K-user-Phi-smooth1\]) is obtained as $$\begin{aligned}
\mbox{minimize} & &  {\mbox{\bb E}}\left [ \sum_{k,\ell} w_{k,\ell}({{\bf S}}) {{\cal E}}_{k, \ell}({{\bf S}})  \right ] \label{K-user-Phi-smooth2} \\
\mbox{subject to} & & {\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) \overline{\mu} ({{\cal E}}_{k,\ell}({{\bf S}}) S_k)   \right ] \geq \lambda_k, \;\;\; \forall \; k = 1,\ldots, K \nonumber \\
& & {{\bf 1}}^{{\sf T}}{{\bf W}}({{\bf s}}) {{\bf 1}}= 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K \nonumber \\
& & {\mbox{\bb P}}( s_k {{\cal E}}_{k,\ell}({{\bf s}}) \geq {{\sf snr}}_0) = 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \;\;\; \ell = 0,\ldots, L, \nonumber \\
& & w_{k,\ell}({{\bf s}}) \geq 0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \;\;\; \ell = 0,\ldots, L,  \nonumber \end{aligned}$$ We have:

\[deterministic-E\] The relaxed problem (\[K-user-Phi-smooth2\]) admits a solution where ${{\cal E}}_{k,\ell}({{\bf s}})$ is a deterministic function $e_{k,\ell}({{\bf s}})$ of $k,\ell$ and ${{\bf s}}$.

The following result identifies a case for which the relaxation is tight. 

\[indicators\] Consider the case $P_\ell({{\sf snr}}) = 1\{ {{\sf snr}}\geq a_\ell \}$, for some SNR thresholds $a_0 = {{\sf snr}}_0 \leq a_1 \leq \cdots \leq a_L$, and assume that the non-decreasing piecewise linear function joining the points $(a_\ell, R_\ell)$ for $\ell = 0,\ldots, L+1$ is concave (note: for convenience we define $a_{L+1} = +\infty$ and $R_{L+1} = R_L$).  Then, the relaxed problem (\[K-user-Phi-smooth2\]) yields the same value as the original problem (\[K-user-Phi-smooth1\]), and this is obtained by the deterministic energy allocation function $e_{k,\ell}({{\bf s}}) = a_\ell/s_k$.

It is also immediate to observe that when the PHY mode success probabilities are given by indicator functions (as in the assumption of Lemma \[indicators\]) but the piecewise linear function joining the points $(a_\ell, R_\ell)$ for $\ell = 0,\ldots, L+1$ is not concave, then we can obtain an equivalent problem with a reduced number $L' < L$ of PHY modes, by retaining only the modes for which the corresponding point $(a_\ell, R_\ell)$ is on the boundary of the convex hull.  In other words, PHY modes whose SNR threshold – rate point $(a_\ell, R_\ell)$ is inside the convex hull of other modes are irrelevant as far as the minimum energy problem is concerned, and can be dropped without changing the system performance.  Therefore, there is no loss of generality in the concavity assumption of Lemma \[indicators\]. 

Summarizing: we have identified one case, namely, the case where the PHY mode success probabilities are given by indicator functions $1\{ {{\sf snr}}\geq a_\ell\}$ for some mode-dependent SNR thresholds $a_\ell$, for which the relaxation obtained by replacing $\mu({{\sf snr}})$ with its upper concave envelope $\overline{\mu}({{\sf snr}})$, does not increase the value of the problem.  Moreover, in this case the optimal energy allocation is deterministic, given explicitly by $e_{k,\ell}({{\bf s}}) = a_\ell/s_k$. As we will see next, for this case we can find efficiently an exact solution.  Since the case of concave increasing piecewise linear rate functions is easily handled, it is natural to seek achievable upper bounds and lower bounds for the case of general $P_\ell({{\sf snr}})$ by defining appropriate concave piecewise linear rate functions. 

Exact solution for the case $P_\ell({{\sf snr}}) = 1\{{{\sf snr}}\geq a_\ell\}$
-------------------------------------------------------------------------------

In passing, we notice that this case is relevant for long packets and strong channel coding schemes.  For example, assuming a family of capacity-achieving codes for the circularly symmetric AWGN channel [@Cover_Thomas_book], and using the strong converse to the channel coding theorem,[^8] we have that the successful decoding probability for rate $R_\ell$ behaves as an indicator function with SNR threshold $a_\ell = 2^{R_\ell} - 1$. In practice, heavily coded systems (e.g., systems using powerful turbo or LDPC codes [@urbanke-book], or concatenated convolutional and Reed-Solomon codes [@proakis-book]) are characterized by very sharp error probability waterfalls: as soon as the received SNR falls below a certain code-dependent threshold, the post-decoding block error probability increases very rapidly.  In this case, approximating $P_\ell({{\sf snr}})$ with an indicator function for an appropriately chosen SNR threshold may be meaningful. 

By Lemmas \[deterministic-E\] and \[indicators\] and their consequences summarized before, we have that in the case $P_\ell({{\sf snr}}) = 1\{{{\sf snr}}\geq a_\ell\}$ the minimum energy function problem (\[K-user-Phi-smooth1\]) is equivalent to: $$\begin{aligned}
\mbox{minimize} & &  {\mbox{\bb E}}\left [ {{\bf b}}^{{\sf T}}({{\bf S}}) {{\bf W}}({{\bf S}}) {{\bf a}}\right ] \label{K-user-Phi1} \\
\mbox{subject to} & & {\mbox{\bb E}}\left [  {{\bf W}}({{\bf S}}) {{\bf r}}\right ] \geq {\hbox{\boldmath$\lambda$}}, \nonumber \\
& & {{\bf 1}}^{{\sf T}}{{\bf W}}({{\bf s}}) {{\bf 1}}= 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K \nonumber \\
& & w_{k,\ell}({{\bf s}})  \geq 0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \;\;\; \ell = 0,\ldots, L,  \nonumber\end{aligned}$$ where we define ${{\bf b}}({{\bf s}}) = (1/s_1, \ldots, 1/s_K)^{{\sf T}}$, ${{\bf a}}= (a_0, \ldots, a_L)^{{\sf T}}$ and ${{\bf r}}= (0, R_1, \ldots, R_L)^{{\sf T}}$.

Notice that (\[K-user-Phi1\]) is an infinite-dimensional linear program, since both the objective function and the constraints are linear in the weighting function ${{\bf W}}({{\bf s}})$. For notation convenience and later use, we let $r_\ell$ denote the $\ell$-th components of the rate vector ${{\bf r}}$. We shall discuss the solution (\[K-user-Phi1\]) allowing for some lack of rigor.  We can think of ${{\bf W}}({{\bf s}})$ as an array of variables $w_{k,\ell}({{\bf s}})$ for each $k,\ell$ and ${{\bf s}}$, and replace expectations with the corresponding Stieltjes integrals [@grimmett]. [ ^9] Then, the Lagrangian function for (\[K-user-Phi1\]) is given by $$\begin{aligned}
 \label{lagrangian-K-user}
{{\cal L}}({{\bf W}}, {\hbox{\boldmath$\omega$}},\nu) & = & \int_{{\mbox{\bb R}}_+^K}  \left [ {{\bf b}}^{{\sf T}}({{\bf s}}) {{\bf W}}({{\bf s}}) {{\bf a}}- {\hbox{\boldmath$\omega$}}^{{\sf T}}\left ( {{\bf W}}({{\bf s}}) {{\bf r}}- {\hbox{\boldmath$\lambda$}}\right ) + \nu({{\bf s}}) \left ( {{\bf 1}}^{{\sf T}}{{\bf W}}({{\bf s}}) {{\bf 1}}-  1 \right ) \right ] \; dF_S({{\bf s}}), \end{aligned}$$ where ${\hbox{\boldmath$\omega$}}$ (non-negative vector) and $\nu({{\bf s}})$ (non-negative scalar function) are dual variables.  By taking the partial derivative with respect to $w_{k,\ell}({{\bf s}})$, for given $k,\ell$ and ${{\bf s}}$, we find $$\begin{aligned}
 \label{KKT2}
\frac{\partial {{\cal L}}}{\partial w_{k,\ell}({{\bf s}})} & = & dF_S({{\bf s}}) \left [ \frac{a_\ell}{s_k}  - \omega_k r_\ell  + \nu({{\bf s}}) \right ].  \end{aligned}$$ Then, since (\[K-user-Phi1\]) is a linear program in ${{\bf W}}({{\bf s}})$, the solution must be found at the vertex of the domain of ${{\bf W}}({{\bf s}})$ for which the inner product between ${{\bf W}}({{\bf s}})$ and the vector of partial derivatives is minimum.  This corresponds to choosing with probability 1 the sensor $k$ with PHY mode $\ell$ such that the corresponding term $\frac{\partial {{\cal L}}}{\partial w_{k,\ell}({{\bf s}})}$ in (\[KKT2\]) is minimum.  Hence, we have proved the following result:

\[multi-sensor-min-power\] The minimum of (\[lagrangian-K-user\]) over ${{\bf W}}({{\bf s}})$ for fixed ${\hbox{\boldmath$\omega$}}\geq 0$ and given vectors ${{\bf a}}$ and ${{\bf r}}$ is given by $$\label{sol-K}
w_{k,\ell}({{\bf s}}) = \left \{ 
\begin{array}{ll}
1 & \mbox{if} \; \omega_k r_\ell  - \frac{a_\ell}{s_k}  \geq \omega_i r_j  - \frac{a_j}{s_i}  \; \forall \; (i,j) \\
0 & \mbox{otherwise} 
\end{array} \right .$$

The solution (\[sol-K\]) corresponds to partitioning the channel state space into [*decision regions*]{} ${{\cal R}}_{k,\ell} = \{ {{\bf s}}\in {\mbox{\bb R}}_+^K : w_{k,\ell}({{\bf s}}) = 1 \}$. These regions for $K > 1$ sensors are not just simple hyper-rectangles, and therefore it is difficult to obtain a more explicit characterization.  We will see in Section \[one-user\] that for the single-sensor case the regions are intervals that can be characterized more explicitly.  In general, letting ${{\bf W}}_{{\hbox{\boldmath$\omega$}}} ({{\bf s}})$ denote the solution (\[sol-K\]), we can define the corresponding average sum energy: $$\label{energy-omega} 
\Gamma({\hbox{\boldmath$\omega$}}) = {\mbox{\bb E}}\left [ {{\bf b}}^{{\sf T}}({{\bf S}}) {{\bf W}}_{{\hbox{\boldmath$\omega$}}} ({{\bf S}}) {{\bf a}}\right ],$$ and average rate vector $$\label{rate-omega} 
{{\bf C}}({\hbox{\boldmath$\omega$}}) = {\mbox{\bb E}}\left [ {{\bf W}}_{{\hbox{\boldmath$\omega$}}} ({{\bf S}}) {{\bf r}}\right ].$$ Although the decision regions defined by Theorem \[multi-sensor-min-power\] do not lead, in general, to a closed-form for the expectations in (\[energy-omega\]) and in (\[rate-omega\]), these can be easily computed by Monte Carlo averaging over the channel fading state ${{\bf S}}\sim F_S({{\bf s}})$. Eventually, the minimum energy function for given threshold SNRs vector ${{\bf a}}$ and rate vector ${{\bf r}}$, can be obtained by solving the Lagrangian dual problem with respect to ${\hbox{\boldmath$\omega$}}$, i.e., by maximizing ${{\cal L}}({{\bf W}}_{{\hbox{\boldmath$\omega$}}}, {\hbox{\boldmath$\omega$}})$ over ${\hbox{\boldmath$\omega$}}\in {\mbox{\bb R}}_+^K$.[^10] This can be obtained by a subgradient method, starting from some initial value ${\hbox{\boldmath$\omega$}}(0) \in {\mbox{\bb R}}_+^K$, and successively updating the dual variables according to $$\label{sub-iteration} 
{\hbox{\boldmath$\omega$}}(n+1) = {\hbox{\boldmath$\omega$}}(n) + \epsilon_n {{\bf v}}(n),$$ where ${{\bf v}}(n)$ is a subgradient for the problem.  A subgradient can be found by noticing that, for any ${\hbox{\boldmath$\omega$}}', {\hbox{\boldmath$\omega$}}\in {\mbox{\bb R}}_+^K$, since ${{\bf W}}_{{\hbox{\boldmath$\omega$}}'}$ is a minimizer of ${{\cal L}}({{\bf W}},{\hbox{\boldmath$\omega$}}')$, we have $$\begin{aligned}
 \label{subgradient}
{{\cal L}}({{\bf W}}_{{\hbox{\boldmath$\omega$}}'}, {\hbox{\boldmath$\omega$}}') 
& = & \Gamma({\hbox{\boldmath$\omega$}}') - ({\hbox{\boldmath$\omega$}}')^{{\sf T}}({{\bf C}}({\hbox{\boldmath$\omega$}}') - {\hbox{\boldmath$\lambda$}}) \nonumber \\
& \leq & \Gamma({\hbox{\boldmath$\omega$}}) - ({\hbox{\boldmath$\omega$}}')^{{\sf T}}({{\bf C}}({\hbox{\boldmath$\omega$}}) - {\hbox{\boldmath$\lambda$}}) \nonumber \\
& \leq & {{\cal L}}({{\bf W}}_{{\hbox{\boldmath$\omega$}}}, {\hbox{\boldmath$\omega$}})  + ({\hbox{\boldmath$\omega$}}' - {\hbox{\boldmath$\omega$}})^{{\sf T}}({\hbox{\boldmath$\lambda$}}- {{\bf C}}({\hbox{\boldmath$\omega$}}) ).\end{aligned}$$ It follows that a subgradient at ${\hbox{\boldmath$\omega$}}(n)$ is given by the vector ${{\bf v}}(n) = {\hbox{\boldmath$\lambda$}}- {{\bf C}}({\hbox{\boldmath$\omega$}})$. The sub-gradient iteration (\[sub-iteration\]) with this choice of the subgradient has an intuitive meaning: if for some $k$, the $k$-th component of the vector ${\hbox{\boldmath$\lambda$}}- {{\bf C}}({\hbox{\boldmath$\omega$}})$ is positive (i.e., the average service rate of sensor $k$ is below its arrival rate $\lambda_k$), then the corresponding weight $\omega_k(n)$ is increased.  Otherwise, it is decreased.  The iteration step can be chosen as $\epsilon_n = \epsilon_0 \frac{1+b}{n+b}$, for suitable parameters $\epsilon_0, b > 0$. The resulting sequence of values $\Gamma({\hbox{\boldmath$\omega$}}(n))$ obtained by the above iteration converges to $\Phi({\hbox{\boldmath$\lambda$}})$ as $n \rightarrow \infty$ (in practice, we checked that convergence is very fast). 

Achievable upper bound on the minimum energy function
-----------------------------------------------------

Driven by the intuition developed for the case where the PHY mode successful decoding probabilities are indicator functions, we fix the receiver SNR threshold values ${{\bf a}}= (a_0, \ldots, a_L)^{{\sf T}}$, with $a_0 = {{\sf snr}}_0$, and define the deterministic energy allocation function $e_{k,\ell}({{\bf s}}) = \frac{a_\ell}{s_k}$. Replacing this into problem (\[K-user-Phi-smooth1\]), we obtain that the optimization with respect to ${{\bf W}}({{\bf s}})$ is again given in the form (\[K-user-Phi1\]), where now ${{\bf a}}$ is fixed [*a priori*]{}, and ${{\bf r}}= (0, R_1P_1(a_1), \ldots, R_LP_L(a_L))^{{\sf T}}$. In the example of Fig.  \[PERfig-example\], $\mu({{\sf snr}})$ is shown together with the piecewise constant curve defined by the points $\{ (a_\ell, R_\ell P_\ell(a_\ell) : \ell = 0, \ldots, L\}$, corresponding to a specific choice of the target received SNRs $a_\ell$. Eventually, we arrive at a linear program formally identical to what we have already solved, for a given set of receiver SNR values and for the corresponding set of [*effective rates*]{} $r_\ell = R_\ell P_\ell(a_\ell)$. Therefore, Theorem \[multi-sensor-min-power\] and the subgradient iteration can be applied verbatim, yielding the solution ${{\bf W}}({{\bf s}};{{\bf a}})$ and an achievable upper bound $\Phi({\hbox{\boldmath$\lambda$}}; {{\bf a}}) \geq \Phi({\hbox{\boldmath$\lambda$}})$.

The achievable upper bound can be tightened by optimizing over ${{\bf a}}$, through an educated exhaustive search over an appropriate domain.  In order to determine a suitable search domain, consider the typical behavior of $\mu({{\sf snr}})$ as shown in the example of Fig.  \[PERfig-example\].  We notice that for each $\ell$-th PHY mode there exists a narrow interval where the effective rate presents a sharp transition between very small to almost $R_\ell$ effective rate.  This corresponds to the “waterfall” of the successful decoding probability $P_\ell({{\sf snr}})$ (see Fig.  \[PERfig\]).  The optimal values of $a_\ell$ is found in this transition interval, indicated by $[{{\sf snr}}^{(0)}_\ell, {{\sf snr}}^{(1)}_\ell]$. As a rule of thumb, we choose ${{\sf snr}}^{(1)}_\ell$ such that $P_\ell({{\sf snr}}^{(1)}_\ell) = 0.99$, and ${{\sf snr}}^{(0)}_\ell$ such that $P_\ell({{\sf snr}}^{(0)}_\ell) = 0.1$. We argue that searching outside this interval is useless.  In fact, for $a_\ell < {{\sf snr}}^{(0)}_\ell$ the contribution of PHY mode $\ell$ to the overall average rate is too small, and therefore this mode is never selected by the scheduling policy (i.e., the corresponding probability $w_{k,\ell}({{\bf s}})$ solution of (\[K-user-Phi1\]) is zero for all $k$ and ${{\bf s}}$).  In contrast, for $a_\ell > {{\sf snr}}^{(1)}_\ell$ the contribution of PHY mode $\ell$ to the average rate does not increase, since it is essentially already almost equal to its upper bound $R_\ell$, while the contribution to the average energy increases linearly with $a_\ell$. Therefore, the proposed achievable upper bound $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$ to the minimum energy function is obtained by minimizing $\Phi({\hbox{\boldmath$\lambda$}};{{\bf a}})$ over ${{\bf a}}$ in the Cartesian product region $\prod_{\ell=1}^L \left [ {{\sf snr}}^{(0)}_\ell , {{\sf snr}}^{(1)}_\ell \right ]$, for such appropriately defined intervals.  For small $L$, as the Bluetooth-like system at hand, this can be done by discretizing this $L$-dimensional hyper-rectangular search region and exhaustively calculating $\Phi({\hbox{\boldmath$\lambda$}}; {{\bf a}})$ for each ${{\bf a}}$ in the discretized grid.  Notice that this complexity depends on the number of transmission modes $L$ and on the shape of the mode effective rate function (e.g., see Fig.  \[PERfig-example\]), and not on the number of sensors $K$. We wish to remark that this search is needed only for the purpose of performance evaluation, and it is performed off-line.  This has [*no impact on the complexity of the dynamic scheduling algorithms*]{} of Sections \[opt-scheduling\] and \[switch\], as we shall discuss later. 

Lower bound on the minimum energy function
------------------------------------------

As mentioned before, we construct a lower bound for $\Phi({\hbox{\boldmath$\lambda$}})$ by finding a piecewise linear concave function $\widetilde{\mu}({{\sf snr}}) \geq \overline{\mu}({{\sf snr}})$ and use this in the relaxed problem (\[K-user-Phi-smooth2\]).  The rate function upper bound is obtained as follows.  Let $\widetilde{a}_0 = {{\sf snr}}_0$ and $\widetilde{\mu}_0 = 0$. Then, for $\ell = 0,1,\ldots, L-1$, find the straight line passing through the point $(\widetilde{a}_\ell, \widetilde{\mu}_\ell)$, strictly upperbounding $\mu({{\sf snr}})$ for all ${{\sf snr}}> \widetilde{a}_\ell$ with the exception of at most one tangent point.  Let the straight line be given by $$y = m_\ell (x - \widetilde{a}_\ell) + \widetilde{\mu}_\ell,$$ for some $m_\ell \geq 0$, and find the intercept of this line with the horizontal line $y = R_{\ell+1}$. Denote the abscissa of this intercept by $\widetilde{a}_{\ell+1}$, let $\widetilde{\mu}_{\ell+1} = R_{\ell+1}$, let $\ell \rightarrow \ell + 1$ and repeat the procedure.  In this way, by linearly interpolating the obtained points, we have constructed a piecewise linear function $\widetilde{\mu}({{\sf snr}})$ with $L+1$ segments joining the points $\{ (\widetilde{a}_\ell, \widetilde{\mu}_\ell): \ell = 0, \ldots, L\}$, completed with a last horizontal segment $\widetilde{{{\sf snr}}} = R_L$ for ${{\sf snr}}\geq \widetilde{a}_L$. The example of Fig.  \[PERfig-example\], shows $\widetilde{\mu}({{\sf snr}})$ obtained as said above, together with the actual non-concave rate function $\mu({{\sf snr}})$.

From the proof of Lemma \[indicators\] it is apparent that the relaxed problem (\[K-user-Phi-smooth2\]) obtained by replacing $\overline{\mu}({{\sf snr}})$ with the concave piecewise linear upper bound $\widetilde{\mu}({{\sf snr}})$ is equivalent to the original problem (\[K-user-Phi-smooth1\]), with indicator function probabilities $P_\ell({{\sf snr}}) = 1\{ {{\sf snr}}\geq \widetilde{a}_\ell\}$. Hence, Theorem \[multi-sensor-min-power\] and the subgradient search illustrated before can be used to efficiently obtain the sought lower bound $\underline{\Phi}({\hbox{\boldmath$\lambda$}})$.

A numerical example
-------------------

As a concluding example, we show in Fig.  \[bounds\] the upper and lower bounds to $\Phi(\lambda)$ for the case of a single sensor $K=1$, and the rate functions of Fig.  \[PERfig-example\], obtained with the fading cdf $F_S(\cdot)$ used throughout all numerical results in this paper, described below.  Three curves are shown.  The solid line corresponds to $\overline{\Phi}(\lambda)$ obtained as explained before, including the optimization over the receiver SNR vector ${{\bf a}}$. The dotted line shows a non-optimized upper bound, obtained by choosing the threshold SNRs such that the corresponding $P_\ell(a_\ell) = 0.99$. These are the same values corresponding to the piecewise constant rate function of Fig.  \[PERfig-example\], and are included here to show the effect of searching over ${{\bf a}}$. Finally, the dashed line corresponds to $\underline{\Phi}(\lambda)$ calculated as explained above, using the function $\widetilde{\mu}({{\sf snr}})$ shown in Fig.  \[PERfig-example\]. 

#### Remark on the channel state statistics

The problems leading to $\Phi({\hbox{\boldmath$\lambda$}})$, $\underline{\Phi}({\hbox{\boldmath$\lambda$}})$ and $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$ are generally feasible if the products $a_\ell {\mbox{\bb E}}[1/S_k | {{\bf S}}\in {{\cal R}}_{k,\ell} ]$ are finite for all $k,\ell$. This may not hold for some fading distributions.  For example, in the case of Rayleigh (resp.,  Ricean) fading, $S_k$ is central (resp.,  non-central) chi-squared with two degrees of freedom.  For $K = 1$ (single sensor) and ${{\cal R}}_{1,\ell}$ containing the origin, then the expectation of the inverse channel fading is unbounded.  In particular, for the case $K = 1$ we have the policy decision region (see Section \[one-user\]) ${{\cal R}}_{1,0} = [0, s_1)$ for some fading threshold $s_1 > 0$, so that ${{\sf snr}}_0 {\mbox{\bb E}}[1/S | S \in [0, s_1)]$ is unbounded, unless ${{\sf snr}}_0 = 0$. It should be noticed here that for any $K > 1$ the [*multiuser diversity*]{} inherent in the system is sufficient to achieve finite average energy even for ${{\sf snr}}_0 > 0$. Nevertheless, in order to avoid analytical problems with the case $K = 1$, ${{\sf snr}}_0 > 0$, in all numerical results presented in this paper we used a truncated Ricean fading distribution [@proakis-book] with probability density function (pdf) $f_S(s)$ with support $s \in [s_{\min}, \infty)$, with Rice factor ${{\cal K}}= 6.95$ dB, unit second moment and where $s_{\min} = 0.01$ corresponding to a deep fade of $-20$ dB. These fading statistics are relevant for typical WBAN. 

#### Remark on the Bluetooth packet length

In the Bluetooth-like system model, each transmission can span 1, 3 or 5 time slots with different rate/successful detection probability tradeoffs.  We assume that the span of each packet is not adapted on a per-slot basis, but it is optimized offline, based on the fading statistics.  Therefore, the number of time slots per payload is fixed for all transmissions.  We evaluated the $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$ for each of the packet lengths using the method given in this section, and we found that for a wide range of arrival rates the minimum energy is achieved for payload length of 3 time slots.  Hence, in all numerical results presented in this work we set the number of slots per payload to 3, i.e., we used PHY modes 2dh3 and 3dh3 of Table \[PacketSlots\] and Fig.  \[PERfig\].  The corresponding effective rates, including the protocol overhead, are given by $R_1 = 2 \times 367/371$ and $R_2 =  3 \times 552/556$.

A closer look at the single-sensor case {#one-user}
---------------------------------------

In this section, we take a closer look at the single-sensor case and provide more insight on the structure of the policy achieving $\Phi(\lambda)$ (in the case $P_\ell({{\sf snr}}) = 1\{ {{\sf snr}}\geq a_\ell\}$) or $\overline{\Phi}(\lambda)$ (in the general smooth $P_\ell({{\sf snr}})$ case).  In both this section and Section \[switch\], considering a single sensor, we drop the sensor index for the sake of notation simplicity. 

The decision regions of Theorem \[multi-sensor-min-power\], in this case, are given by: $$\label{dec-region1}
{{\cal R}}_\ell = \left \{ s \in {\mbox{\bb R}}_+ \; : \; \omega r_\ell  - \frac{a_\ell}{s}  \geq \omega r_j  - \frac{a_j}{s}, \; \forall \; j \neq \ell \right \}$$ In order to proceed further, we assume that (as in Lemma \[indicators\]) the points $(a_0, 0)$, $(a_1,r_1)$, $(a_2,r_2)$, $\ldots$, $(a_L,r_L)$ define a concave non-decreasing piecewise linear function for ${{\sf snr}}\geq a_0$. This corresponds to the general principle of diminishing return that typically occurs in communications channels, such that any additional increment of received SNR provides proportionally less and less rate as SNR increases.  For example, the SNR thresholds $a_\ell = {{\sf snr}}_\ell = 2^{r_\ell} - 1$ corresponding to a family of capacity-achieving codes for the circularly symmetric AWGN channel satisfies this property. 

Under this concavity condition, it is immediate to see that the regions ${{\cal R}}_\ell$ are in fact intervals that partition the channel state space ${\mbox{\bb R}}_+$, for any value of the Lagrange multiplier $\omega > 0$. Defining the breakpoints $s_0 = 0$, $s_{L+1} = +\infty$ and $$\label{state-thresholds} 
s_\ell = \frac{a_\ell - a_{\ell-1}}{\omega (r_\ell  - r_{\ell-1})},$$ for $\ell = 1,2,\ldots, L$. The concavity condition implies the ordering $s_0 < s_1 \leq s_2 \leq \cdots \leq s_L < s_{L+1}$ and, consequently, ${{\cal R}}_\ell = [s_\ell, s_{\ell+1} )$. 

It follows that the optimization solution in the single sensor case takes on the intuitive form of a mode selection strategy that depends on the strength of the channel state: if $S
\in [s_\ell, s_{\ell+1})$, then mode $\ell$ is chosen with transmit energy per symbol $\frac{a_\ell}{s}$. As already observed for Lemma \[indicators\], if the concavity condition is not satisfied, some PHY modes are irrelevant for the minimum energy solution.  We can re-define the problem for $L' < L$ modes, satisfying the concavity condition.  Notice the upper concave envelope $\overline{\mu}({{\sf snr}})$ of the SNR/rate points $\{(a_\ell, r_\ell)\}$ yields the achievable long-term average rate versus received SNR curve obtained by time-sharing between the different PHY modes.  If a point lies below this curve, it means that a better SNR/rate point can be achieved by time-sharing between two other such points.  Intuitively, this explains why these points can be discarded from the optimization. 

By using the explicit expression of the decision regions into the expression of the average energy and rate (\[energy-omega\]) and (\[rate-omega\]), we obtain $$\label{energy-omega1} 
\Gamma(\omega) = \sum_{\ell=0}^L \int_{s_\ell}^{s_{\ell+1}} \frac{a_\ell}{s} dF_S(s),$$ and $$\label{rate-omega1} 
C (\omega) =  \sum_{\ell=1}^L r_\ell \int_{s_\ell}^{s_{\ell+1}} dF_S(s),$$ where the dependence on $\omega$ is contained in the thresholds $\{s_\ell\}$ through (\[state-thresholds\]).  Finally, the Lagrange multiplier is obtained by solving (numerically) the equation $C(\omega) = \lambda$.

When we evaluate the achievable upper bound $\overline{\Phi}(\lambda)$, searching for the optimal target receiver SNR vector ${{\bf a}}$ is easily done by using the almost closed-form expressions (\[energy-omega1\]) – (\[rate-omega1\]).  Then, the same values (which depend only on the protocol modes and not on the number of sensors), can be reused for the multisensor case (recall that any choice of ${{\bf a}}$ yields a valid upper bound).  Fig.  \[sec5\] shows $\Phi(\lambda)$ for $P_\ell({{\sf snr}})$ given by Fig.  \[PERfig\] for the two enhanced data rates 2dh3 and 3dh3, a single sensor ($K = 1$), and different choices of the NULL packet target SNR.  For comparison, we also show $\Phi(\lambda)$ for a system with the same PHY mode rates of 2 and 3 bit/s/Hz, but exploiting ideal capacity achieving codes and ${{\sf snr}}_0 = 0$. The very large gap between the minimum energy function of Bluetooth-like systems and the ideal system stresses the fact that the PHY layer of Bluetooth is very suboptimal, in exchange for very low complexity. 

ÒMinimum average energy subject to (finite) average delay constraints {#opt-scheduling}
=====================================================================

In this section we consider the more general problem of minimizing the transmit energy subject to an average (finite) delay constraint, particularize the scheduling policy developed in [@Neely-IT07] to our setting, in order to operate closely to any desired point of the optimal energy-delay tradeoff curve.  This policy depends on the control parameter $V \in {\mbox{\bb R}}_+$, and provably achieves near-optimal energy-delay tradeoff in the following sense: for $V > R_L$, the policy achieves delay $\overline{D} = O(\sqrt{V} \log V)$ with average transmitted sum-energy per symbol $\overline{E} - \Phi({\hbox{\boldmath$\lambda$}}) = O(1/V)$. For twice-differentiable $\Phi({\hbox{\boldmath$\lambda$}})$, it is known that any policy must satisfy the Berry-Gallager bound: if $\overline{E} - \Phi({\hbox{\boldmath$\lambda$}}) = O(1/V)$ then $\overline{D} = \Omega(\sqrt{V})$ [@Neely-IT07].  In our case, since the channel fading has a continuous distribution, $\Phi({\hbox{\boldmath$\lambda$}})$ is a strictly convex continuous and increasing function of ${\hbox{\boldmath$\lambda$}}$ and therefore it is twice differentiable almost everywhere [@rockafellar1996convex] with strictly positive Hessian. 

The maximum absolute variation of $Q_k(t)$ for any $k$ from one slot to the next is bounded by $\delta_{\max} = \max\{ A_{\max}, R_L\}$, where $A_{\max}$ is the bound on the arrival process.  We assume a strict peak power constraint ${{\cal P}}_{\max}$, such that ${{\cal P}}_{\max} s_{\min} \geq {{\sf snr}}_0$, therefore, the minimum required received SNR while transmitting rate $R_0 = 0$ (NULL control packets) can always be achieved.  Defining the constants $Q_{th}, \zeta, \nu > 0$ such that, for $V > 0$, $\zeta = \frac{\nu}{\delta_{\max}^2} e^{-\nu/\delta_{\max}}$, $\nu = \frac{1}{\sqrt{V}}$ and $Q_{th} = \frac{6}{\zeta} \log \frac{1}{\nu}$ (see [@Neely-IT07]) the dynamic scheduling policy proceeds as follows. 

The scheduling policy is given in Algorithm \[algo1\].  At each slot-time $t$, the scheduler chooses a sensor $k(t)$, a transmit energy per symbol $E_{k(t)}(t)$ and a mode $\ell(t)$. This selection is given as the result of the optimization step (\[Eopt\]), performed at each slot time $t$. The weights in this optimization are computed by updating [*auxiliary queues*]{} ${{\bf X}}(t) = (X_1(t), \ldots, X_K(t))$ according to $$\begin{aligned}
 \label{X}
X_k(t + 1) & = & \left [ X_k(t) - \mu(E_k(t) S_k(t)) -  \nu 1\{Q_k(t) < Q_{th} \} \right ]_+ \nonumber \\
& & + A_k(t) +  \nu 1\{Q_k(t) \geq Q_{th} \}\end{aligned}$$ where $\mu({{\sf snr}})$ is defined in (\[mu\]), extended such that $\mu({{\sf snr}}) = 0$ for ${{\sf snr}}\leq {{\sf snr}}_0$. Also, it is understood that if $k(t) \neq k$ then $E_k(t) = 0$.

-   Initialize ${{\bf X}}(0)= {{\bf 0}}$.

-   [**for**]{} $t = 1,2,...$ [**repeat :**]{}

    [**for**]{} $k=1, \ldots, K$ [**let**]{}: $$\begin{aligned}
    \widehat{E}_k &=& {{\hbox{arg}}}\min_{e \in [{{\sf snr}}_0/S_k(t), {{\cal P}}_{\max}]} \left \{ V e -  \left [ W_k(t) \right ]_+ \;  \mu(e S_k(t)) \right \} \label{Eopt}\end{aligned}$$ where $$\begin{aligned}
     \label{W}
    W_k(t) & = &  1\{Q_k(t) \geq Q_{th} \} \times \zeta e^{\zeta(Q_k(t) - Q_{th})} \nonumber \\
    & & - 1\{Q_k(t) < Q_{th} \}  \times \zeta e^{-\zeta(Q_k(t) - Q_{th})} + 2X_k(t)\end{aligned}$$ and let $$\widehat{\ell}_k = \left \{ \begin{array}{ll}
    0 & \mbox{if} \;\;\; \widehat{E}_k S_k(t) = {{\sf snr}}_0 \\
    {{\hbox{arg}}}\max_{\ell = 1,\ldots, L} \{ R_\ell P_\ell(\widehat{E}_k S_k(t)) \} & \mbox{if} \;\;\; \widehat{E}_k S_k(t) > {{\sf snr}}_0 
    \end{array} \right .$$ [**end for**]{}

-   Let $k(t)  = {{\hbox{arg}}}\min_{k=1,\ldots,K} \left \{  V \widehat{E}_k -  \left [ W_k(t) \right ]_+ \;  \mu(\widehat{E}_k S_k(t)) \right \}$, let $\ell(t) = \widehat{\ell}_{k(t)}$, $E_{k(t)}(t) = \widehat{E}_{k(t)}$ and $E_k(t) = 0$ for all $k \neq k(t)$.

-   Let sensor $k(t)$ transmit with energy $E_{k(t)}(t)$ and PHY mode $\ell(t)$ on slot $t$.

-   For the current arrival vector ${{\bf A}}(t)$ update the queue buffers and scheduler weights according to (\[buffer-evo\]) and (\[X\]), respectively.\
    [**end for**]{}

The dynamic policy of Algorithm 1 requires the on-line computation of the minimum in (\[Eopt\]) for all $k = 1,\ldots, K$. For $W_k(t) \leq 0$, (\[Eopt\]) yields $\widehat{E}_k = {{\sf snr}}_0/S_k(t)$. For $W_k(t) > 0$, using (\[mu\]), the minimization in (\[Eopt\]) is equivalent to calculating $$\label{ziocanebastardo}
\min_{e \in [{{\sf snr}}_0/S_k(t), {{\cal P}}_{\max}]} \; \left \{ V e - \left [ W_k(t) \right ]_+ \;  R_\ell P_\ell(e S_k(t)) \right \}$$ for $\ell = 0, \ldots, L$, and choosing the energy value that achieves the overall minimum.  This can be obtained by performing $L$ one-dimensional line searches [^11] over the interval $[{{\sf snr}}_0/S_k(t), {{\cal P}}_{\max}]$, with linear complexity in $L$. Also, we noticed that by computing (\[ziocanebastardo\]) at the energy values $e_\ell = a_\ell / S_k(t)$, where $\{a_\ell\}$ are the SNR thresholds resulting from the calculation of $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$, and selecting the PHY mode accordingly, the performance of Algorithm 1 is practically indistinguishable from the case where the full line search is performed.  In fact, if the probabilities $P_\ell({{\sf snr}})$ are indicator functions, then the the minimum of (\[ziocanebastardo\]) must be one of the break-points $\{{{\sf snr}}_\ell/S_k(t)\}$. Hence, given the shape of the probabilities $P_\ell({{\sf snr}})$ (see Fig.  \[PERfig-example\]), it is not surprising that the actual minimum of (\[ziocanebastardo\]) is very close to the value at $e_\ell = a_\ell / S_k(t)$. We conclude that the complexity of the on-line optimization performed in Algorithm 1 is $O(L)$ with respect to the number of PHY modes, and $O(K\log K)$ with respect to the number of sensors, due to the presence of the maximization over $k$. In practical WBANs, both $L$ and $K$ are small integers, therefore these complexity orders are quite irrelevant.  As a matter of fact, Algorithm 1 can be easily implemented in the piconet hub (typically a powerful smartphone, equipped with a modern multi-core processor). 

In order to gain insight on the gain achievable by the multi-sensor dynamic scheduling policy given in this section, we compare its energy-delay performance with that of a suboptimal system that runs a single-user energy-delay algorithm independently for each sensor (see Section \[one-user\]), and uses round-robin channel allocation to given to all sensors the same fraction of system bandwidth.  We considered a piconet with two sensors with same channel state statistics and two setups: 1) symmetric arrival rates $\lambda_1 = \lambda_2$, and deterministic packet arrivals (one packet per slot per sensor); 2) symmetric arrival rates with different probabilities of packet arrival $q_1=1.0$ and $q_2=0.2$. In setup 2, the arrival process of sensor 2 is i.i.d.  with geometrically distributed inter-arrival time with ${\mbox{\bb P}}(A_2(t) = 0) = 1 - q_2$ and ${\mbox{\bb P}}(A_2(t) = \lambda_2/q_2) = q_2$. The corresponding energy-delay tradeoff curves are shown in Fig.  \[opportunistic\].  The achievable sum average energy $\overline{\Phi}(1,1)$ yields the horizontal line, and is computed using method described in Section \[min-pow-K\], for the packet success probabilities $P_\ell({{\sf snr}})$ of Bluetooth 2dh3 and 3dh3 PHY modes, with ${{\sf snr}}_0 = 8$ dB. We notice that the multisensor scheduling policy, which selects opportunistically the sensor to serve on each slot, based on the channel state and on the queue state, achieves a significant gain in average transmit energy with respect to a conventional round-robin piconet scheduling.  By increasing the control parameter $V$ the average energy tends to its minimum, while the delay increases.  We also considered an asymmetric setup with deterministic arrivals (one packet per slot) but the two arrival rates are different, namely $\lambda_1 = 0.04$ bit/s/Hz and $\lambda_2 = 1.0$ bit/s/Hz.  The corresponding energy-delay tradeoff curves are shown in Fig.  \[opportunistic2\].  These examples indicate that the energy savings of the multi-sensor dynamic scheduling policy increase when the sensors are asymmetric, either because of the different inter-arrival statistics, and because of the different arrival average rate. 

Improved policy with adaptive sleep mode optimization {#switch}
=====================================================

The scheduling policy of Section \[opt-scheduling\] is near-optimal under the assumption that there is no power expenditure when no payload data is transmitted [@Neely-IT07; @Berry-Gallager-IT02].  However, as already discussed a few times in this paper, in Bluetooth or similar systems a transmitter must spend power for transmitting NULL control packets even when it has no data to transmit.  In this section we investigate an adaptive policy that switches between sleep and connected modes.  We focus first on the single-sensor case, and then discuss the extension to the case of $K > 1$.

By introducing a sleep mode, the transmitter has two distinct states and the scheduling problem becomes significantly more complicated.  A rather general formulation of the problem was addressed in terms of dynamic programming over “renewal intervals” in [@neely2009stochastic], where the event of disconnecting the sensor and moving to sleep mode is a recurrent event that somehow “resets” the system.  For the sake of a simple on-line implementation, here we seek a heuristic approach that yields significant improvements with respect to the dynamic policy of Algorithm \[algo1\]. 

In order to motivate our approach, we observe the qualitative behavior of the policy of Algorithm \[algo1\] for fixed arrival rate $\lambda$ with different levels of “burstiness” of the arrival process.  Consider Fig.  \[kazzi\], obtained by Algorithm \[algo1\] in the case of a bursty arrival process $A(t)$ with i.i.d.  arrivals, arrival rate $\lambda = 0.04$ bit/s/Hz and ${\mbox{\bb P}}(A(t) = \lambda/q) = q$ and ${\mbox{\bb P}}(A(t) = 0) = 1 - q$. We notice that the scheduler tends to allocate high power and high rate immediately after a non-zero data arrival, when the queue buffer is large.  Then, as $Q(t)$ becomes smaller and eventually drops slightly the threshold $Q_{th}$ (see Algorithm \[algo1\]), the scheduler tends to allocate smaller rates and smaller transmit powers.  Eventually, it uses the minimum power necessary for NULL packets with zero payload data rate, until the next arrival. 

From (\[buffer-evo\]), (\[X\]) and (\[W\]) we have that if $Q(t) < Q_{th}$ and no arrivals occur at slot $t$, then necessarily $X(t + 1) < X(t)$ (i.e., the auxiliary queue has a locally decreasing trajectory).  Furthermore, when $X(t)$ is sufficiently small such that $W(t) \leq 0$, the coefficient $W(t)$ is certainly non-positive until the next arrival.  It follows that when the algorithm enters the condition $W(t) = 0$, it keeps scheduling NULL slots until the next arrival time.  Let $t_0$ and $t_1$ denote two consecutive arrival times, and assume that the condition $W(t) = 0$ occurs at $t_w$, i.e., we define the conditional stopping time $$t_w = \min_{t > t_0} \;\; \{ W(t) \leq 0 : \mbox{arrival at time} \; t_0 \}.$$ Assuming that at time $t_1$ the buffer queue jumps above the threshold $Q_{th}$ and the algorithm schedules non-NULL slots, the average energy per symbol spent in the “idle” phase is given by $$\begin{aligned}
 \label{conditional-idle-power} 
\overline{E}_{\rm idle}(t_w  ,t_0) 
& = & {\mbox{\bb E}}\left [ \left .  \sum_{\tau = t_w}^{t_1} \frac{{{\sf snr}}_0}{S(\tau)}   \right | t_1 > t_w , t_0\right ] \nonumber \\
& = & {\mbox{\bb E}}\left [ \frac{{{\sf snr}}_0}{S} \right ]   {\mbox{\bb E}}\left [ \left .  t_1 - t_w  + 1 \right | t_1 > t_w,  t_0 \right ] \nonumber \\
& = & \overline{E}_{\rm NULL} \times \Delta(t_w, t_0), \end{aligned}$$ where we define $\overline{E}_{\rm NULL} =  {\mbox{\bb E}}\left [ \frac{{{\sf snr}}_0}{S} \right ]$ as the average energy necessary to transmit a NULL packet, and the term $\Delta(t_w, t_0) = {\mbox{\bb E}}\left [ \left .  t_1 - t_w  + 1 \right | t_1 > t_w,  t_0 \right ]$ is the conditional average idle time for given $t_w$ and $t_0$. For example, in the case of deterministic arrivals, which are representative of sensors that collect one measurement of $A_{\max}$ bit/s/Hz each interval of (say) $N$ slots, we have $$\begin{aligned}
 \label{idle-time-determ}
\Delta(t_w, t_0) & = & {\mbox{\bb E}}\left [ \left .  t_1 - t_w  + 1 \right | t_1 > t_w,  t_0 \right ] = N - (t_w  - t_0) + 1.  \end{aligned}$$ In the case of geometrically distributed inter-arrival times with ${\mbox{\bb P}}(A(t) = A_{\max}) = q$, we have $$\begin{aligned}
 \label{idle-time-geom}
\Delta(t_w, t_0) & = & {\mbox{\bb E}}\left [ \left .  t_1 - t_w  + 1 \right | t_1 > t_w,  t_0 \right ] \nonumber \\
& = & {\mbox{\bb E}}\left [ \left .  t_1 \right | t_1 > t_w \right ] - t_w + 1 = \frac{1}{q} + 1.\end{aligned}$$ Assuming that $\Delta(t_w, t_0)$ is known a priori from the system statistics, we propose the following switching strategy in order to take advantage of the sleeping mode: at each new arrival $t_0$, the policy resets.  Focusing on a given inter-arrival period and letting $t_0$ be the starting time (i.e., the time of the most recent arrival), if $t_0 < t_w < t_1$ occurs, i.e., the scheduler enters the idle interval before a new arrival occurs, then the policy switches to sleep mode if $\overline{E}_{\rm idle}(t_w,t_0) > \overline{E}_{\rm sleep}$, where the latter is the average energy cost of disconnecting and setting up a new connection as soon as a new arrival occurs.  In general, $\overline{E}_{\rm sleep}$ depends on the paging and hand-shaking procedures, which involve the transmission of some control packets.  In our results, we let $\overline{E}_{\rm sleep} = \tau \overline{E}_{\rm NULL}$ for some value $\tau > 1$, since we assume that the energy cost of disconnecting and reconnecting at a later time is some multiple of the NULL control packet average energy.  Then, the improved policy switches to sleeping mode if $\Delta(t_w, t_0) > \tau$. Fig.  \[switch-fig\] compares the energy-delay tradeoff obtained by the proposed switching policy for different values of $\tau$, for the same arrival statistics of the snapshots of Fig.  \[kazzi\].  The case $\tau = 10$ corresponds to no switching because the cost of disconnecting and reconnecting is equal to the expected cost of NULL packets in idle times.  In this case, the curve coincides with what obtained by Algorithm \[algo1\]. 

In order to extend this idea to the case of $K > 1$ sensors, we observe that when there exists at least one sensor with data to transmit in its queue buffer, it is very likely that the hub will poll this sensor.  In this case, even though some sensors are idle, they are unlikely to be polled and therefore they need not send NULL packets.  Instead, if all sensors have below-threshold buffers, the minimization in (\[Eopt\]) yields $\widehat{E}_k = {{\sf snr}}_0/S_k(t)$ for all $k$. Hence, the sensor with the largest value of channel state $S_k(t)$ will be polled and has to respond with a NULL packet.  For independent identically distributed stationary and ergodic fading processes across the sensors, each sensor is equally likely to have the largest fading state, therefore, all sensors have the same probability $1/K$ of sending a NULL packet.  An example of this situation is evidenced by the snapshot of Fig.  \[kazzi2\], obtained by applying Algorithm \[algo1\] in the case of $K = 2$ sensors, with i.i.d.  channel state and arrival processes, each of which has the same statistics as in Fig.  \[kazzi\].  Based on these observations, for $K > 1$ we define $t_0$ to be the time of the last data arrival over all sensors, and the stopping time $t_w$ as $$t_w = \min_{t > t_0} \;\; \{ W_k(t) \leq 0 \;\; \forall \; k : \mbox{last arrival at time} \; t_0 \}.$$ In words, $t_w$ is the first time where all sensors become idle since the last packet arrival in the whole piconet.  Then, each sensor $k$ calculates an estimate of the expected energy spent to send NULL packets as $\overline{E}_{{\rm idle},k}(t_w  ,t_0)  = \frac{\overline{E}_{\rm NULL}}{K} \times  \Delta_k(t_w, t_0)$, where $\Delta_k(t_w, t_0)$ is defined as in (\[idle-time-geom\]) for the arrival process of sensor $k$, and where the factor $1/K$ is due to the fact that, when all sensors are idle, they transmit NULL packets for $1/K$ of the slots, on average.  Each sensor $k$ switches to sleep mode if $\overline{E}_{{\rm idle},k}(t_w  ,t_0) > \overline{E}_{\rm sleep}$. Suppose that at time $t_w$ some sensor switches to sleep mode.  Then, at time $t_w+1$, if the condition $W_k(t_w+1) \leq 0$ still holds, then the same decision is repeated for the surviving network of $K' < K$ still connected sensors, by decrementing $\Delta_k(t_w, t_0)$ by one slot unit.  The switching decision process repeats for $t_w+2, t_w + 3, \ldots$, until some new packet arrives into the network.  Sleeping sensors turn “on” again when they receive a new non-zero data packet and their weights become positive again. 

We expect that for $K > 1$ the proposed switching policy can achieve significant gains over the standard dynamic scheduling policy of Algorithm \[algo1\] when all arrival processes are bursty.  In contrast, if one or more sensors have full queue buffers most of the time, then the switching condition does not occur.  In this case, sensors are rarely requested to send NULL packets, since there exists some sensor with data to send with high probability, and therefore the hub will likely poll these sensors. 

This intuition is confirmed by numerical simulations.  Fig.  \[switch-fig2\] shows the energy-delay tradeoff of the proposed switching policy for $K = 2$ symmetric sensors with arrival statistics as in Fig.  \[kazzi2\].  Fig.  \[switch-fig3\] shows analogous curves for an asymmetric case where $\lambda_1 = 0.04$ bit/s/Hz, $q_1 = 0.1$, and $\lambda_2 = 1.0$ bit/s/Hz and $q_2 = 1.0$ (deterministic arrivals).  The switching policy achieves significant gains over the non-switching policy in the case of Fig.  \[switch-fig2\], where both sensors have bursty arrival processes.  Instead, in the case of Fig.  \[switch-fig3\], sensor 2 has always data to transmit, and the switching conditions never occurs.  On the other hand, sensor 1 does not waste energy to send NULL packets during its own idle times, since sensor 2 is polled with high probability instead. 

Conclusions
===========

We studied the minimum energy function and the energy-delay tradeoff in a wireless network inspired by a Bluetooth piconet with $K$ sensors and a data-collection hub.  This problem is motivated by body-area wireless sensor networks, where power efficiency plays a key role, but critical data must be delivered with low delay.  This paper explicitly considers system features such as a finite (and typically small) number of possible data rates, simple block codes (or even uncoded modulation) with non-negligible packet error probabilities, and the cost of protocol overhead packets (NULL packets) in order to maintain a connection in the absence of payload data.  In this context, we applied a known general theory of near-optimal scheduling for energy-delay tradeoff and have obtained an easily computable solution for the minimum energy function in the case where the codes packet error probabilities are 0 if the receiver SNR is above some code-dependent threshold, and 1 elsewhere.  This sharp transition behavior is relevant for very powerful codes and large block length.  In the case of moderate block length and/or of weak codes (such as in the Bluetooth-like system considered here), the packet error probabilities are smooth functions of the received SNR.  In this case, we developed an easily computable achievable upper bound and a lower bound to the minimum energy function.  Furthermore, we provided an explicit scheduling algorithm that provably operates along the optimal power-delay tradeoff, and at each slot performs sensor selection, power allocation and transmission mode (and rate) selection.  Finally, we proposed a novel improved strategy for the case where the transmission of NULL control packets has a non-zero power cost (this is in fact the most relevant and practical case).  Our improved strategy adaptively switches the sensor to sleep mode, by comparing the conditional expected cost of maintaining the connection, given the present state, with the average cost of disconnecting and re-connecting later on. 

The proposed algorithms are amenable for an on-line implementation at the hub node, since in a Bluetooth-like piconet the hub node polls the sensors, and our strategy only requires a different “opportunistic” polling order, that depends on the sensors queue state and on the channel state.  The problem of learning the channel fading gains at the transmitter to a sufficient level of accuracy goes beyond the scope of this work, and should be addressed by some suitable two-way training scheme, exploiting time-division duplex operations, reciprocity and the rather large channel time-frequency correlation. 

Proofs of auxiliary results {#proofs}
===========================

Proof of Lemma \[deterministic-E\]
----------------------------------

Using iterated expectation, we write the objective function in (\[K-user-Phi-smooth2\]) as $${\mbox{\bb E}}\left [ \sum_{k,\ell} w_{k,\ell}({{\bf S}}) {{\cal E}}_{k, \ell}({{\bf S}})  \right ] = {\mbox{\bb E}}\left [ \sum_{k,\ell} w_{k,\ell}({{\bf S}}) {\mbox{\bb E}}[ {{\cal E}}_{k, \ell}({{\bf S}}) |{{\bf S}}] \right ].$$ Using the concavity of $\overline{\mu}({{\sf snr}})$, iterated expectation and Jensen’s inequality in the terms appearing in the stability constraints we obtain $$\begin{aligned}
{\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) \overline{\mu} ({{\cal E}}_{k,\ell}({{\bf S}}) S_k)   \right ] 
& = &  {\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) {\mbox{\bb E}}[ \overline{\mu} ({{\cal E}}_{k,\ell}({{\bf S}}) S_k) | {{\bf S}}]   \right ] \nonumber \\
& \leq &  {\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) \overline{\mu} ({\mbox{\bb E}}[  {{\cal E}}_{k,\ell}({{\bf S}})| {{\bf S}}]  S_k)   \right ].  \end{aligned}$$ Hence, for any probability assignment $p_{{{\cal E}}_\pi |{{\cal K}}_\pi, {{\cal L}}_\pi, {{\bf S}}}( e | k,\ell,{{\bf s}})$ for ${{\cal E}}_{k,\ell}({{\bf s}})$ we can find the feasible deterministic energy function $e_{k,\ell}({{\bf s}}) = {\mbox{\bb E}}[{{\cal E}}_{k,\ell}({{\bf S}}) | {{\bf S}}= {{\bf s}}]$ that yields a smaller or equal value of the problem. 

Proof of Lemma \[indicators\]
-----------------------------

First, notice that under the assumption of Lemma \[indicators\] the upper concave envelope $\overline{\mu}({{\sf snr}})$ coincides with the piecewise linear function joining the points $(a_\ell, R_\ell)$ for $\ell = 0, \ldots, L+1$. For any feasible ${{\bf W}}({{\bf s}})$ and randomized energy allocation ${{\cal E}}_{k,\ell}({{\bf s}})$ with conditional distribution $p_{{{\cal E}}_\pi |{{\cal K}}_\pi, {{\cal L}}_\pi, {{\bf S}}}( e | k,\ell,{{\bf s}})$, define the quantized energy allocation $$\label{quantized-energy}
\Xi_{k,\ell}({{\bf s}})  = \left \{ \begin{array}{ll} 
\frac{a_\ell}{s_k}, &  \mbox{for} \;\; {{\cal E}}_{k,\ell}({{\bf s}}) \geq \frac{a_\ell}{s_k} \\
\frac{a_0}{s_k}, & \mbox{for} \;\; {{\cal E}}_{k,\ell}({{\bf s}}) < \frac{a_\ell}{s_k}.  \end{array} \right .$$ Notice that the equality $1\{ {{\cal E}}_{k,\ell}({{\bf s}}) s_k \geq a_\ell \} =  1\{ \Xi_{k,\ell}({{\bf s}}) s_k \geq a_\ell \}$ holds with probability 1 for all $k, \ell$ and ${{\bf s}}$. Then, the terms in the stability constraints of (\[K-user-Phi-smooth1\]) are preserved by replacing ${{\cal E}}_{k,\ell}({{\bf s}})$ with $\Xi_{k,\ell}({{\bf s}})$. Furthermore, since ${\mbox{\bb P}}(\Xi_{k,\ell}({{\bf s}}) \leq {{\cal E}}_{k,\ell}({{\bf s}})) = 1$ for all $k,\ell$ and ${{\bf s}}$, we have that the objective function in (\[K-user-Phi-smooth1\]) cannot increase by replacing ${{\cal E}}_{k,\ell}({{\bf s}})$ with $\Xi_{k,\ell}({{\bf s}})$. Hence, the optimal energy allocation must be in the quantized form (\[quantized-energy\]) with at most two mass points, one at $\frac{a_\ell}{s_k}$ and the other at $\frac{a_0}{s_k}$, with probabilities indicated by $\xi_{k,\ell}({{\bf s}})$ and $1 - \xi_{k,\ell}({{\bf s}})$, respectively. 

When restricting the energy allocation to the two-mass point random variable (\[quantized-energy\]), the objective function in (\[K-user-Phi-smooth1\]) takes on the form $$\begin{aligned}
 \label{obj-indicator}
{\mbox{\bb E}}\left [ \sum_{k,\ell} w_{k,\ell}({{\bf S}}) \Xi_{k, \ell}({{\bf S}}) \right ] 
& = & 
{\mbox{\bb E}}\left [ \sum_k \widetilde{w}_k({{\bf S}}) \sum_{\ell=0}^L \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} \left ( \frac{a_0}{S_k} (1 - \xi_{k,\ell}({{\bf S}})) + \frac{a_\ell}{S_k}
\xi_{k,\ell}({{\bf S}}) \right ) \right ] \nonumber \\
& = & 
{\mbox{\bb E}}\left [ \sum_k \widetilde{w}_k({{\bf S}}) \left \{ \left ( \frac{w_{k,0}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} + \sum_{\ell=1}^L \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} (1 - \xi_{k,\ell}({{\bf S}})) \right ) \frac{a_0}{S_k} \right .  \right .  \nonumber \\
& & \left .  \left .  +  \sum_{\ell=1}^L \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} \xi_{k,\ell}({{\bf S}})  \frac{a_\ell}{S_k} \xi_{k,\ell}({{\bf S}}) \right \} \right ] \nonumber \\
& = & 
{\mbox{\bb E}}\left [ \sum_k \widetilde{w}_k({{\bf S}}) \sum_{\ell=0}^L \widetilde{w}_{\ell | k}({{\bf S}}) \frac{a_\ell}{S_k}  \right ],  \end{aligned}$$ where $\widetilde{w}_k({{\bf s}}) = \sum_{\ell=0}^L w_{k,\ell}({{\bf s}})$ and where we define the conditional probability mass function $\widetilde{w}_{\ell | k}({{\bf s}})$ of choosing PHY mode $\ell$ given that the sensor $k$ is scheduled, and the channel state is equal to ${{\bf s}}$, given by $$\begin{aligned}
\widetilde{w}_{0|k}({{\bf s}}) & = &  \frac{w_{k,0}({{\bf s}})}{\widetilde{w}_k({{\bf s}})} + \sum_{\ell=1}^L \frac{w_{k,\ell}({{\bf s}})}{\widetilde{w}_k({{\bf s}})} (1 - \xi_{k,\ell}({{\bf s}})) \\
\widetilde{w}_{\ell | k}({{\bf s}}) & = & \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} \xi_{k,\ell}({{\bf S}}), \;\;\; \mbox{for} \;\; \ell > 0.\end{aligned}$$ The terms appearing in the stability constraints can be written as $$\begin{aligned}
 \label{constr-indicator}
{\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) R_\ell 1\{ \Xi_{k,\ell}({{\bf S}}) S_k \geq a_\ell\}   \right ] 
& = & {\mbox{\bb E}}\left [ \widetilde{w}_k({{\bf S}}) \sum_{\ell = 1}^L  \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} \xi_{k,\ell}({{\bf S}}) R_\ell   \right ] \nonumber \\
& = & {\mbox{\bb E}}\left [ \widetilde{w}_k({{\bf S}}) \sum_{\ell = 0}^L  \widetilde{w}_{\ell | k}({{\bf S}}) R_\ell   \right ].\end{aligned}$$ At this point, we have reduced the solution of (\[K-user-Phi-smooth1\]) to the determination of the conditional probability mass function $\widetilde{w}_k({{\bf s}}) \widetilde{w}_{\ell | k}({{\bf s}})$ of ${{\cal K}}_\pi, {{\cal L}}_\pi$ given the channel state ${{\bf S}}= {{\bf s}}$, where the energy allocation for given $k,\ell$ and ${{\bf s}}$ is deterministically given by $e_{k,\ell}({{\bf s}}) = a_\ell/s_k$. This provides a direct proof of the second statement of the lemma. 

In order to prove the tightness of the relaxed problem, we first show that the optimal $\widetilde{w}_{\ell | k}({{\bf s}})$ is “concentrated” with at most two probability masses, at two consecutive indices $\ell, \ell+1$. For any feasible $\widetilde{w}_k({{\bf s}}) \widetilde{w}_{\ell | k}({{\bf s}})$, let $$\begin{aligned}
E_k({{\bf s}}) & = & \sum_\ell \widetilde{w}_{\ell | k}({{\bf s}}) \frac{a_\ell}{s_k} \nonumber \\
\mu_k({{\bf s}}) & = & \sum_\ell \widetilde{w}_{\ell | k}({{\bf s}}) R_\ell.   \end{aligned}$$ For any fixed ${{\bf s}}$, by construction, the point $(E_k({{\bf s}}) , \mu_k({{\bf s}}))$ is inside the convex hull of the points $(a_\ell/s_k, R_\ell)$ for $\ell = 0,\ldots, L$. Hence, there exists a probability mass function $\widehat{w}_{\ell | k}({{\bf s}})$ that has only two mass points at consecutive indices $\ell(k,{{\bf s}}), \ell(k,{{\bf s}}) + 1$ for some $\ell(k,{{\bf s}})$ to be determined below, yielding the same stability constraint and a smaller average energy.  The situation is shown qualitatively in Fig.  \[convex-hull\].  The two-points probability mass function is constructed as follows: let $\ell(k,{{\bf s}})$ denote the index in $0, \ldots, L$ such that $R_\ell(k,{{\bf s}}) \leq \mu_k({{\bf s}}) < R_{\ell(k,{{\bf s}})+1}$. Then, we let $$\label{two-mass} 
\widehat{w}_{\ell | k}({{\bf s}}) = \left \{
\begin{array}{ll}
\frac{R_{\ell(k,{{\bf s}})+1} - \mu_k({{\bf s}})}{R_{\ell(k,{{\bf s}})+1} - R_{\ell(k,{{\bf s}})}}, & \mbox{for} \;\; \ell = \ell(k,{{\bf s}}) \\
\frac{\mu_k({{\bf s}}) - R_{\ell(k,{{\bf s}})}}{R_{\ell(k,{{\bf s}})+1} - R_{\ell(k,{{\bf s}})}}, & \mbox{for} \;\; \ell = \ell(k,{{\bf s}}) + 1\\
0 & \mbox{elsewhere.}  \end{array} \right .$$ It can be immediately checked that this probability yields the average energy $\widehat{E}_k({{\bf s}})$ given by the intersect of the segment of straight line joining the points $(a_{\ell(k,{{\bf s}})}/s_k, R_{\ell(k,{{\bf s}})})$ and $(a_{\ell(k,{{\bf s}})+1}/s_k, R_{\ell(k,{{\bf s}})+1})$ with the horizontal line at level $\mu_k({{\bf s}})$. Since the straight line segment is part of the boundary of the convex hull (see Fig.  \[convex-hull\]), then $\widehat{E}_k({{\bf s}}) \leq E_k({{\bf s}})$. Notice also that the union of these straight line segments coincides with the function $\overline{\mu}(e s_k)$ (function of the dummy energy variable $e$ on the energy-rate plane, for fixed $s_k$), where $\overline{\mu}({{\sf snr}})$ is the already defined upper concave envelope of $\mu({{\sf snr}}) = \max_\ell \{ R_\ell 1\{ {{\sf snr}}\geq a_\ell \}\}$.

![ Convex-hull argument in the proof of Lemma \[indicators\]: for any probability assignment achieving the point $(E_k({{\bf s}}), \mu_k({{\bf s}}))$ (in blue) on the energy-rate plane, there exists a two-mass probability assignment achieving the point $(\widehat{E}_k({{\bf s}}), \mu_k({{\bf s}}))$ (in green), with $\widehat{E}_k({{\bf s}}) \leq E_k({{\bf s}})$. In the example of the figure, this is obtained by the convex combination of the extreme points $(a_1/s_k, R_1)$ and $(a_2/s_k, R_2)$, i.e., in this case we have $\ell(k,{{\bf s}}) = 1$.[]{data-label="convex-hull"}](convex-hull){width="12cm"}

The proof of Lemma \[indicators\] is concluded by observing that, for the probability assignment $\widehat{w}_{\ell | k}({{\bf s}})$ defined in (\[two-mass\]), the objective function and stability constraint terms of the original problem (\[K-user-Phi-smooth1\]) can be written as $${\mbox{\bb E}}\left [ \sum_k \widetilde{w}_k({{\bf S}}) \widehat{E}_k({{\bf S}}) \right ],$$ and as $${\mbox{\bb E}}\left [ \widetilde{w}_k({{\bf S}}) \overline{\mu}(\widehat{E}_k({{\bf S}}) S_k) \right ],$$ respectively.  Hence, (\[K-user-Phi-smooth1\]) is equivalent to the problem $$\begin{aligned}
\mbox{minimize} & &  {\mbox{\bb E}}\left [ \sum_{k} \widetilde{w}_{k}({{\bf S}}) \widehat{E}_{k}({{\bf S}})  \right ]  
\label{K-user-Phi-modified-indicators} \\
\mbox{subject to} & & {\mbox{\bb E}}\left [ \widetilde{w}_{k}({{\bf S}}) \overline{\mu}(\widehat{E}_{k}({{\bf S}}) S_k ) \right ]  \geq \lambda_k, \;\;\; \forall \; k = 1, \ldots, K, \nonumber \\
& & {{\bf 1}}^{{\sf T}}\widetilde{{{\bf w}}}({{\bf s}}) = 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K \nonumber \\
& & s_k \widehat{E}_{k}({{\bf s}}) \geq {{\sf snr}}_0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \nonumber \\
& & \widetilde{w}_{k}({{\bf s}})  \geq 0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \nonumber\end{aligned}$$ given directly in terms of the probability vector function $\widetilde{{{\bf w}}}({{\bf s}})$ and of the energy allocation function $\widehat{E}_k({{\bf s}})$. The equivalence of (\[K-user-Phi-modified-indicators\]) with the the relaxed problem (\[K-user-Phi-smooth2\]), and therefore the proof of the first statement of Lemma \[indicators\], is established by the following general result:

\[equivalence\] Problem (\[K-user-Phi-smooth2\]) yields the same value as the reduced dimensional problem $$\begin{aligned}
\mbox{minimize} & &  {\mbox{\bb E}}\left [ \sum_{k} \widetilde{w}_{k}({{\bf S}}) \widetilde{e}_{k}({{\bf S}})  \right ]  \label{K-user-Phi-modified} \\
\mbox{subject to} & & {\mbox{\bb E}}\left [ \widetilde{w}_{k}({{\bf S}}) \overline{\mu}(\widetilde{e}_{k}({{\bf S}}) S_k ) \right ]  \geq \lambda_k, \;\;\;\forall \; k = 1, \ldots, K, \nonumber \\
& & {{\bf 1}}^{{\sf T}}\widetilde{{{\bf w}}}({{\bf s}}) = 1, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K \nonumber \\
& & s_k \widetilde{e}_{k}({{\bf s}}) \geq {{\sf snr}}_0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \nonumber \\
& & \widetilde{w}_{k}({{\bf s}})  \geq 0, \;\;\; \forall \;\; {{\bf s}}\in {\mbox{\bb R}}_+^K, \;\; k = 1,\ldots,K, \nonumber\end{aligned}$$ where $\widetilde{{{\bf w}}}({{\bf s}}) = (\widetilde{w}_1({{\bf s}}), \ldots, \widetilde{w}_K({{\bf s}}))^{{\sf T}}$ and $\widetilde{{{\bf e}}}({{\bf s}}) = (\widetilde{e}_1({{\bf s}}), \ldots, \widetilde{e}_K({{\bf s}}))^{{\sf T}}$ are a probability and an energy allocation vectors, deterministic functions of the channel state. 

By Lemma \[deterministic-E\], we know that it is sufficient to consider deterministic energy allocation functions denoted by $e_{k,\ell}({{\bf s}})$. For any feasible ${{\bf W}}({{\bf s}})$ and $e_{k,\ell}({{\bf s}})$ in (\[K-user-Phi-smooth2\]), define $\widetilde{w}_k({{\bf s}}) = \sum_{\ell=0}^L w_{k,\ell}({{\bf s}})$ and write the objective function in (\[K-user-Phi-smooth2\]) as $$\begin{aligned}
{\mbox{\bb E}}\left [ \sum_{k,\ell} w_{k,\ell}({{\bf S}}) e_{k, \ell}({{\bf S}})  \right ] 
& = & {\mbox{\bb E}}\left [ \sum_{k} \widetilde{w}_k({{\bf S}}) \sum_\ell \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} e_{k, \ell}({{\bf S}})  \right ] \nonumber \\
& = & {\mbox{\bb E}}\left [ \sum_{k} \widetilde{w}_k({{\bf S}}) \widetilde{e}_k({{\bf S}}) \right ] \end{aligned}$$ where $\widetilde{e}_k({{\bf s}}) = \sum_\ell \frac{w_{k,\ell}({{\bf s}})}{\widetilde{w}_k({{\bf s}})} e_{k, \ell}({{\bf s}})$. Also, the terms in the rate constraints can be upper bounded as $$\begin{aligned}
{\mbox{\bb E}}\left [ \sum_{\ell} w_{k,\ell}({{\bf S}}) \overline{\mu} (e_{k,\ell}({{\bf S}}) S_k)   \right ] 
& = &  {\mbox{\bb E}}\left [ \widetilde{w}_k({{\bf S}}) \sum_{\ell} \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})} \overline{\mu} (e_{k,\ell}({{\bf S}}) S_k)  \right ] \nonumber \\
& \leq &  {\mbox{\bb E}}\left [ \widetilde{w}_k({{\bf S}}) \overline{\mu} \left ( \sum_{\ell} \frac{w_{k,\ell}({{\bf S}})}{\widetilde{w}_k({{\bf S}})}  e_{k,\ell}({{\bf S}}) S_k \right )  \right ] \nonumber \\
& = &  {\mbox{\bb E}}\left [ \widetilde{w}_k({{\bf S}}) \overline{\mu} \left ( \widetilde{e}_{k}({{\bf S}}) S_k \right )  \right ],  \end{aligned}$$ where we used Jensen’s inequality.  This shows that the value of problem (\[K-user-Phi-modified\]) lower bounds the value of problem (\[K-user-Phi-smooth2\]).  Conversely, problem (\[K-user-Phi-modified\]) corresponds to a specific feasible choice of ${{\bf W}}({{\bf s}})$ and $e_{k,\ell}({{\bf s}})$ in the original problem (\[K-user-Phi-smooth2\]), in particular, by letting $w_{k,\ell}({{\bf s}}) = \widetilde{w}_k({{\bf s}}) /(L+1)$ and $e_{k,\ell}({{\bf s}}) = \widetilde{e}_k({{\bf s}})$, for all $\ell = 0,\ldots, L$, $k = 1,\ldots, K$ and ${{\bf s}}\in {\mbox{\bb R}}_+^K$. This concludes the proof. 

  Sensor type      Throughput (kb/s)
  ---------------- ---------------------------------------
  SpO2             0.01 – 0.1
  Glucose          0.01 – 0.1
  Blood pressure   0.01 – 10
  ECG              10 – 100 (12-bit, 300 Hz, $\times$20)
  EEG              10 – 200 (6kb/s, $\times$32)
  EMG              10 – 1500 (16-bit, 8 kHz, $\times$12)

  : Throughput requirements for medical sensing devices[]{data-label="table"}

  ------------- ---------------- --------------------- ----------
  Raw Data                                             
  Rate (Mbps)   Slots Occupied   No.  bits in payload   Notation
  2             1                464                   2dh1
  2             3                2968                  2dh3
  2             5                5464                  2dh5
  3             1                696                   3dh1
  3             3                4448                  3dh3
  3             5                8200                  3dh5
  ------------- ---------------- --------------------- ----------

  : Payload for each of the enhanced data rate modes for different time slots.  The indication xdhy denotes an [*uncoded*]{} transmission mode with raw spectral efficiency of x bit/s/Hz, and payload spanning y slots.[]{data-label="PacketSlots"}

![ Packet success probability for enhanced data rates EDR2 and EDR3 for all packet lengths under AWGN.[]{data-label="PERfig"}](AWGN_PER2){width="12cm"}

![ Block diagram of the system under consideration consisting of $K$ sensors with arrival rates $A_k(t)$, each equipped with buffer of length $Q_k(t)$ at time $t \in (0,\infty)$, $k \in [1,...,K]$, where each of the sensors experiences independent fading realizations $S_k(t)$.[]{data-label="system1"}](system-model){width="12cm"}

![ Effective rate function $\mu({{\sf snr}})$, the piecewise constant function (maximum of indicator functions) corresponding to the computation of the energy function achievable upper bound $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$ and the piecewise linear function $\widetilde{\mu}({{\sf snr}})$ corresponding to the computation of the lower bound $\underline{\Phi}({\hbox{\boldmath$\lambda$}})$, for the case of Bluetooth with modes 2dh3 and 3dh3, with ${{\sf snr}}_0 = 8$ dB. In this chart, the SNR axis is in linear scale in order to appreciate the actual shape of the curves appearing in the optimization problems.[]{data-label="PERfig-example"}](rateswban){width="12cm"}

![ Functions $\underline{\Phi}(\lambda)$ and $\overline{\Phi}(\lambda)$ (shown in natural scale, not in dB) for the case of $K = 1$, with truncated Ricean channel state statistics, and rates corresponding to Fig.  \[PERfig-example\].[]{data-label="bounds"}](Opt_LB_UB_BW){width="14cm"}

![ Average sum energy function $\overline{\Phi}(\lambda)$ versus arrival rate $\lambda$ for different ${{\sf snr}}_0$ values for the Bluetooth-like protocol with PHY modes 2dh3 and 3dh3 with $K = 1$ sensors.  The corresponding minimum energy function $\Phi(\lambda)$ for an ideal system with capacity-achieving codes of rate 2 and 3 bit/s/Hz, and NULL packet SNR requirement ${{\sf snr}}_0 = 0$ dB is given for comparison.[]{data-label="sec5"}](Phi_Lambda_Ricean_final){width="12cm"}

![ Comparison of round-robin vs. multiuser dynamic scheduling policy (opportunistic) for a piconet with $K = 2$ sensors, with symmetric arrival rates $\lambda_1 = \lambda_2 =1$ bit/s/Hz, and ${{\sf snr}}_0 = 8$ dB, under different arrival statistics.  Setup 1 considers $q_1 = 1, q_2 = 1$, whereas Setup 2 considers $q_1 = 0.2, q_2 = 1$. The horizontal line corresponds to the achievable upper bound to the minimum energy function $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$.[]{data-label="opportunistic"}](TOCA_FINAL3_lambda1_1_lambda2_1){width="12cm"}

![ Comparison of round-robin vs. multiuser dynamic scheduling policy (opportunistic) with asymmetric arrival rates $\lambda_1 = 0.04$ bit/s/Hz, $\lambda_2=1$ bit/s/Hz.  All other parameters are as in Fig.  \[opportunistic\].  The horizontal line corresponds to the achievable upper bound to the minimum energy function $\overline{\Phi}({\hbox{\boldmath$\lambda$}})$.[]{data-label="opportunistic2"}](TOCA_FINAL3_lambda1_004_lambda2_1){width="12cm"}

![ Snapshot of the evolution of the buffer $Q(t)$, scheduler weight $W(t)$ and scheduled rate for a bursty arrival process with $\lambda = 0.04$ bit/s/Hz and $q = 0.1$.[]{data-label="kazzi"}](snapshot_K1_bursty){width="12cm"}

![ Average energy/delay tradeoff achieved by the improved scheduling scheme with adaptive switching to sleeping mode and a bursty arrival process with $\lambda = 0.04$ bit/s/Hz, $q=0.1$ and ${{\sf snr}}_0=8$ dB, for different $\tau$ factors.  The case $\tau = 10$ corresponds to the classical non-switching policy.[]{data-label="switch-fig"}](Sleep_Mode_optimization_FINAL-new){width="14cm"}

![ Snapshot of the evolution of the buffers $Q_k(t)$, scheduler weights $W_k(t)$ and scheduled rates for $K = 2$, independent bursty arrival processes with $\lambda_1 = \lambda_2 = 0.04$ bit/s/Hz and $q_1 = q_2 = 0.1$.[]{data-label="kazzi2"}](snapshot_K2_bursty){width="12cm"}

![ Average energy/delay tradeoff achieved by the improved scheduling scheme with adaptive switching to sleeping mode with $K = 2$, independent bursty arrival processes with $\lambda_1 = \lambda_2 = 0.04$ bit/s/Hz, $q_1 = q_2 = 0.1$ and ${{\sf snr}}_0=8$ dB. The case $\tau = 10$ corresponds to the classical non-switching policy.[]{data-label="switch-fig2"}](Sleep_Mode_optimization_FINAL2){width="12cm"}

![ Average energy/delay tradeoff achieved by the improved scheduling scheme with adaptive switching to sleeping mode for $K = 2$, independent arrival processes with $\lambda_1 = 0.04$ bit/s/Hz, $q_1 = 0.1$, $\lambda_2 = 1.0$ bit/s/Hz and $q_2 = 1.0$ and ${{\sf snr}}_0=8$ dB.[]{data-label="switch-fig3"}](Sleep_Mode_optimization_FINAL3){width="12cm"}

[^1]: E. Rebeiz is with the Department of Electrical Engineering, University of California Los Angeles, Los Angeles CA (e-mail: rebeiz@ee.ucla.edu). 

[^2]: G. Caire and A. F. Molisch are with the Department of Electrical Engineering, University of Southern California, Los Angeles, CA (e-mail: caire, molisch@usc.edu). 

[^3]: In this paper we refer to “energy” to indicate average transmit energy per symbol, which corresponds to the transmit power, up to a fixed proportionality factor that depends on the signaling baud rate (symbols per second). 

[^4]: Notice that hopping is done on a per-packet basis, not a per-timeslot basis. 

[^5]: $1\{{{\cal A}}\}$ denotes the indicator function of an event ${{\cal A}}$ in the underlying probability space. 

[^6]: This is referred to as “capacity region” in [@Neely-IT06], but we prefer to reserve this term to indicate the Shannon capacity region of a multi-terminal network, which may or may not coincide with the stability region, depending on the assumptions. 

[^7]: For example, anyone using a Bluetooth wireless mouse has had the experience of occasional “mouse disconnected” error messages appearing on the laptop screen. 

[^8]: The strong converse result states that if an ensemble of capacity achieving codes is used at rates above the capacity, its block error probability converges to 1 as the block length increases.  This result is proved in great generality in [@verdu-han]. 

[^9]: A more rigorous approach consists of using variational calculus, but here we chose this more intuitive argument. 

[^10]: Since the constraint corresponding to the dual variable $\nu({{\bf s}})$ must be satisfied with equality for the solution ${{\bf W}}_{{\hbox{\boldmath$\omega$}}}$ in (\[sol-K\]), then $\nu({{\bf s}})$ becomes irrelevant and it is dropped for notational simplicity. 

[^11]: For $\ell = 0$ the minimum is achieved at $e = {{\sf snr}}_0/S_k(t)$ therefore no line search is needed.