3.1 Optimal decision problem
Under the prescribed model, the optimal relay decision problem of a source node to transmit energy efficient TCP traffic is straightforward: it periodically updates its best choices of relay nodes for cooperative communication and sets the appropriate control parameters for link layer frame transmission. Equivalently, in each time slot t, S calculates the optimal η(n) for each relay candidate R
n
with relay state x
n
(t) by finding the optimal control parameter setting of L
fr
(t) and N
arq
(t), and then finds the best relay with its control parameters being and and .
(10)
We may transform the original decision problem (10) into an optimal control problem based on the system view: source S decides as an optimal control signal into system consisting of S, and D, so that the control objective, i.e., energy efficiency for TCP relay transmission for S - D pair in the t th time slot, is maximized.
The decision in formula (10) is just made for one time slot. However, when the overall energy efficiency across the time horizon is considered, the greedy solution in which the decision is made just in one time slot scope may be unable to achieve the optimizing goal in a long run. The channel fading states of a relay n, x
n
(t), may have high probability to change to another x
n
(t+1) in the next time slot t+1, which may cause non-ideal performance in energy efficiency. By this way, the overall TCP traffic may have poor energy efficiency performance in a long run. Therefore, we prefer to making the decision with a "one-step lookahead" policy [14].
Based on the assumption that the rayleigh fading channels can be modeled using FSMC and the states of channels for a relay is independent distributed, the decision model for optimal control problem with "one-step lookahead" policy match the Restless Bandit system model in control theory [14]. In addition, we also consider the switching cost in relay selection procedure where the reselection and handover process may consume the energy while spending time for TCP data transmission. Therefore, we adopt Restless Bandit system with Switching Cost (RBSC) [14] based approach in this article.
3.2 Approach based on restless bandit system with switching cost
The RBSC approach is used to solve the stochastic control problems with the following characteristics: there are N projects and one is selected and set active at each time slot t = 0;1, . . . , T - 1. If the system switches from project i to j, it bring an additional costs denoted by c
ij
. Each project is in a finite state space x
n
(t)∈S
n
, n = 1, . . . , N. We denote the Cartesian product of the state spaces as . For project n, a reward is earned if it is selected, otherwise the reward is . Moreover, the reward is time-discounted by factor α∈(0,1). The projects' states change in a Markovian fashion according to the transition probability matrix. Project is selected under a policy u, which is in the set of all available policies . The purpose is to find the optimal u that maximize the expected discounted reward.
In following subsections, the relay network with relay selection decision will be formulated as RBSC system.
3.2.1 Relay state description and system reward
A FSMC is used to model the Rayleigh fading channel according to the received SNR [18]. The received SNR at j from i at time t is denoted as γ
ij
(t) and divided into K discrete levels with increasing order. Each level is associated with a state of the Markov chain. Let ϒ = {ϒ1, ϒ2, . . . , ϒ
K
} denotes the finite state space. The K × K transition probability matrix is
(11)
where and v, u ∈ϒ
In each time slot t ∈ {0, 1, . . . T-1},the state of the n th relay is characterized by the three Rayleigh fading channels, including the source to the n th relay and the destination, and the n th relay to the destination. We assume the state of each channel is independent distributed.
Therefore, the state of the n th relay is described as the three channels' state at time t:
(12)
The relay state changes in a Markovian fashion and the finite state space of the n th relay is denoted as S
n
, that x
n
(t)∈S
n
. The transition probability matrix is
(13)
where Hn = K × K × K and f
n
, j
n
, h
n
, y
n
, u
n
, v
n
∈ ϒ. The matrixes can be obtained and updated according to the history observation, and in simulation, they keep constant.
The purpose of the proposed scheme is to maximize the energy efficiency described in equation (9) by selecting the optimal relay and adjusting the lower layer parameters according to the current relay state. The reward of the n th relay in each time slot t is
(14)
where x
n
(t) is the n th relay state at time t, , L
fr
(t) is the frame size and N
arq
(t) is the maximum retransmission time.
3.2.2 Solving the RBSC
The RBSC problem is determined by several factors: is the set of available projects, S
n
is the state space of the n th project, the Cartesian product of the state spaces is is the action space, P
n
is the transition probability, ν is the initial distribution, c
ij
is denoted as the switching cost from i th relay to j th relay, α∈(0,1) is the discounted factor and r is the reward.
The complete state of the network is (x;s) = (x1,. . . , x
N
;s), where vector × is the current states of N relay nodes, s denotes the current selected relay that . To solve RBSC problem with linear programming, we denote the state-action pairs as . The occupation measures ρ(x;s),aare the expected discounted time of different state-action pairs. The distribution of initial system state is described by ν, e.g., ν (x1, . . . ,x
N
;s) = ν1(x
1
) . . . ν
N
(x
N
) δ1 (s) if the 1 project is selected and set active initially. Let c
ij
denote the switching cost from i to j. α∈(0,1) is the discounter factor. The RBSC problem can be cast into the MDP framework and the linear program can be written:
(15)
In the above formula, the decision variables , which is exponential in size of the input data. Therefore, this problem can not be solved efficiently in the real world. By relaxing the constraint in (15), we get the final LP relaxation for RBSC:
(16)
where is the polytope of the state-action pair variable defined as:
(17)
For N projects, there are variables and constraints. So the variables in (16) is in polynomial size of input data. In addition, the dual of the above LP is:
(18)
The author in [14] provided a primal-dual index heuristic approach to solve the selection problem. For (16) and (18), the solution is denoted as and . The reduced costs are the difference between the left and right of the constraints in (18). The reduced costs are nonnegative and equals to 0 if the corresponding . It is also interpreted as the rate of decrease in the objective value of the primal linear program (16) per unit increase of variable . If the current state is (x1, . . . , x
N
; s), the candidate index (CI) of action a is as:
(19)
which is the sum of all projectsŕeduced cost to action a. Therefore, the optimal action is to select the project with the minimal CI:
(20)
We can store the optimal reduced costs and compute the indices described in (19) in time which is polynomial in the size of input data.
3.3 Relay selection procedure
Based on the approach depicted above, the relay decision algorithm is summarized as Algorithm 1.
For each node, a CoopTable similar to [17] is maintained. Based on the CoopTable, the source node can decide which relay candidate to cooperate for energy-efficient TCP transmission. The revised CoopTable consists of seven fields: the address of destination node (S), the address of potential relay for source node S (R
n
), the CSI (SNR) from S to D (hSD), the CSI (SNR) from S to R
n
, the CSI (SNR) from R
n
to D , the count of failure about this cooperative relay , and the update time. The initial distribution of state and the transition probability, which can be obtained from the network × node (long run node or base station) in advance, is also stored in each node.
The channel states information in CoopTable record can be updated through control frames and overheard transmissions: The channel between any two nodes is assumed to be symmetric, because they all use the same frequency band for transmission. When S receives HTS frame sent by R
n
, it gets the estimated D receives HTS frame and estimates and piggyback it in its CTS frames. When D sends CTS frames, it encapsulates SNR from S to D (γSD) which is estimated at D when receiving RTS. After receiving CTS, S extracts the channel state information γ
SD
and . S and D can also overhear frame from other candidate relays to estimate the channel state information between S and R
x
, R
x
, and D, and D will also piggyback the in its CTS frames. By this way, each S can maintain the CSI for all relays based on which the optimized result for relay selection to achieve energy efficiency of TCP traffic in every time slot can be calculated.
Moreover, when S decision produces a new relay R
n
other than currently selected relay R
s
el, it invokes the relay selection procedure expanded based on CoopMAC, as shown in Figure 3. A new message IDLE is introduced to facilitate the re-selection. S sends a IDLE frame which inform the currently selected relay Rsel to suspend its cooperation and set the state from ACTIVE to NOT ACTIVE after sending back an ACK. IDLE frame also contains NAV to preserve the channel for selection query interactions. S sends RTS to request to provide the cooperation while setting NAV in its frame. The target relay may be available and willing to provide the cooperation so that it sends back the HTS. On the other hand, the target relay may also be reserved by other blind source or unwilling to provide the cooperation. In this case, it keeps silent and replies nothing. If no HTS received at S after SIFS interval, which means the newly selected relay is unavailable at this time, S begins another round of relay decision using Algorithm 1 excluding the unavailable relay. It sends RTS to the newly selected and waits for HTS. The procedure iterates until one HTS is received. Finally, D sends CTS to complete the selection and control interactions. After that, the data transmission begins for t th time slot with the selected relay with the length of link layer frame being and the maximum retransmission time being . Obviously, if S does not decide to change relay in time slot t, the CoopMAC RTS-CTS mode as well as two phases of data relay transmission follows as regular design shown in Figure 2.
Algorithm 1 Select the optimal relay â
Input:
-
S
n
, {State Space}
-
v(x1, . . ., x
N
;s) {Distribution of Initial State}
-
P
n
(t) {State Transition Probability of Each Relay}
-
c
ij
{Switching Cost From Relay i to j}
Output:
1: Obtain the current state of the system: (x;s).
2: Get the optimal solution of primal and dual problems:
3: Get the reduced cost:
4: Calculate the CI of the N relays and select the relay with smallest CI:
In the procedure mentioned above, the switching cost is incurred by the control message interactions for reselection, e.g., IDLE and ACK, RTS and its retransmission. To keep the measurement of switching cost consistent with the energy efficiency in Equation (1), we define the switching cost as the product of the average system reward and the expected extra retransmission time of control frames, where . The probability that the target relay node is idle can be denoted as Pidl, and the expected extra retransmission number is {1/Pidl - 1}. Therefore, the switching cost is , i.e., if the target relay node is idle with probability 1 there is no switching cost.