# Energy-Efficient Subcarrier Pairing and Power Allocation for DF Relay Networks with an Eavesdropper
## 2 System Model and Problem Formulation  
### System Model  
We consider a dual-hop DF relay network as shown in Figure 1, with a single source-destination pair (\(S\)-\(D\)), a single relay node (\(R\)), and an eavesdropper node (\(E\)) between the relay node and the destination node. We assume that all the nodes have a single antenna and full channel state information (CSI) knowledge by performing conventional pilot-based channel estimation methods. By utilizing the channel reciprocity scheme between forward and backward transmissions through orthogonal pilot signals, the CSIs can be estimated at the relay and the destination nodes. The reciprocity is practical as long as the coherence time of the channel is larger than the dual-hop communication time. The destination then feeds back the estimated CSI to the relay. Due to the path-loss and large-scale fading, the direct link between the source and the destination nodes is ignored. Moreover, the relay node is operated in a half-duplex mode with two transmission phases. The eavesdropper can overhear the information transmitted by the relay node. In the first hop, the source node sends signals to the relay node, whereas the relay re-transmits the re-encoded signals to the destination node during the second hop. In the meantime, the source node stays ideal. The eavesdropper eavesdrops the transmitted messages in the second time slot. Moreover, the SR and relay-to-destination (RD) channels on any subcarrier are assumed to be frequency-flat. Let \(\mathcal{K}=\left\{1,2,\cdots,K\right\}\) denote a set of subcarriers within the available bandwidth. The channel coefficient of the SR link on the \(i\)th subcarrier, \(i\in\mathcal{K}\), is denoted by \(h_{SR,i}\), and that of the RD link on the \(j\)th subcarrier, \(j\in\mathcal{K}\), is expressed as \(h_{RD,j}\). Further, the channel coefficient for the relay-to-eavesdropper (RE) link on the \(j\)th subcarrier is given by \(h_{RE,j}\). The signal received by the relay node in the first phase on the \(i\)th subcarrier is written as  
\[y_{R,i}=\sqrt{P_{S,i}}h_{SR,i}s_{i}+n_{R,i} \tag{1}\]  
where \(s_{i}\) is the transmitted signal from the source node on the \(i\)th subcarrier with unit power, i.e., \(E\left[\left|s_{i}\right|^{2}\right]=1\), \(P_{S,i}\) indicates its transmit power, and \(n_{R,i}\) denotes zero-mean Gaussian noise at the relay node with variance \(\sigma_{R,i}^{2}\). Using (1), the signal-to-noise power ratio (SNR) at the relay node is  
\[\Gamma_{SR,i}=\frac{P_{S,i}\left|h_{SR,i}\right|^{2}}{\sigma_{R,i}^{2}} \tag{2}\]  
Figure 1: A decode-and-forward (DF) relay network with an eavesdropper. Supposing that the relay node decodes the data symbol perfectly, in the second phase, the received signal at the destination node and the eavesdropper on the \(j\)th subcarrier can be expressed as  
\[y_{D,j} =\sqrt{P_{R,j}}h_{RD,j}s_{j}+n_{D,j} \tag{3}\] \[y_{E,j} =\sqrt{P_{R,j}}h_{RE,j}s_{j}+n_{E,j} \tag{4}\]  
where \(n_{D,j}\) and \(n_{E,j}\) are defined similar to \(n_{R,i}\) but with variance \(\sigma_{D,j}^{2}\) and \(\sigma_{E,j}^{2}\), respectively. Using (3) and (4), the SNR at the destination and the eavesdropper can be written as  
\[\Gamma_{RD,j} =\frac{P_{R,j}\left|h_{RD,j}\right|^{2}}{\sigma_{D,j}^{2}} \tag{5}\] \[\Gamma_{RE,j} =\frac{P_{R,j}\left|h_{RE,j}\right|^{2}}{\sigma_{E,j}^{2}} \tag{6}\]  
The secrecy rate \(R_{sec}(i,j)\) with the pairing of the \(i\)th subcarrier for the SR link and the \(j\)th subcarrier for the RD link is given by  
\[R_{sec}(i,j)=\left[\frac{1}{2}\log_{2}\left(1+\min\left\{\Gamma_{SR,i},\Gamma_ {RD,j}\right\}\right)-\log_{2}\left(1+\Gamma_{RE,j}\right)\right]^{+} \tag{7}\]  
where \(\left[.\right]^{+}=\max\left\{0,\cdot\right\}\) and \(1/2\) is due to the fact that transmission takes place in two hops. Further, both the transmit and static power dissipation are taken into account to design energy-efficient relay networks. The transmit power relies upon instantaneous channel coefficients, while the static power involves the processing and circuit power.