1 Introduction

1.1 Motivation

Wireless communication technologies play an important role in military and civil applications, and have become a necessitative part of our daily life [1]. However, the broadcast nature of wireless medium makes the communication over wireless networks susceptible to the interception attacks from unauthorized users (eavesdroppers), and thus guaranteeing the security of wireless communication has become an increasingly urgent demand [2].

Traditionally, the security mechanism of wireless communication network is mainly learned from wired computer network, in which the problem of information confidentiality is mainly solved by encryption algorithms based on symmetric key and public key system. The security of encryption algorithms is guaranteed by the extremely high computational complexity required to crack the password [3]. However, with the improvement of computing capability and speed of the devices, more and more complicated algorithms are required to guarantee the same level of security as before.

On the other hand, physical layer security techniques provide a new way to enhance the security of wireless transmission from a new perspective. The core idea is to improve the information confidentiality from coding in information theory, which is highly promising to guarantee everlasting secure communication for wireless networks and has received a lot of attentions [4,5,6,7,8,9, 16,17,18,19,20,21,22,23,24,25]. In the seminal work by Wyner [5], the wiretap channel model was introduced and the possibility of creating perfectly secure communication links without relying on secret keys was demonstrated.

Moreover, cooperative communication is also a building block of current communication systems. The main idea of this technique is to enhance the system performance by providing additional paths between the source and the destination via the relays. It is worth noting that, cooperative relays can provide additional degrees of freedom and more flexible implementations for improving physical layer security. In [6], the relay-eavesdropper channel was studied and different node cooperation strategies were analyzed. It has been shown that cooperative communication provides an effective way to improve the secrecy capacity. On top of that, several relay strategies have been designed in literature [7,8,9].

Meanwhile, the use of buffers at the relays makes it possible to store packets and transmit them in more favorable wireless conditions, which greatly increases the network’s resiliency, throughput and diversity, and has therefore been widely applied in cooperative networks to improve the system performance [10,11,12,13,14,15]. For instance, in [10], the authors applied the deep reinforcement learning for the relay selection in the delay-constrained buffer-aided relay networks. Two asynchronous learning algorithms for joint hybrid non-orthogonal-multiple-access (NOMA)/OMA relay selection and power allocation in buffer-aided delay-constrained networks were proposed in [11]. A buffer-aided relay selection scheme was presented in [12] to seamlessly include both NOMA and OMA transmission in the Internet of Things. The authors in [13] designed the buffer-aided adaptive transmission scheme for the buffer-aided wireless powered cooperative NOMA relaying network. A novel buffer-aided relay selection scheme which is able to balance the outage performance and packet delay was proposed in [14]. In [15], NOMA, buffer-aided full-duplex (FD) relaying and broadcasting were combined to improve the relay selection with low complexity.

Furthermore, the buffer-aided relay is widely used in the research area of physical layer security due to the advantage of improving the secrecy performance [16,17,18,19,20,21,22,23,24,25]. For instance, in [16], we have designed the link selection and power control policies for secure communication over a buffer-aided two hop communication link. In [17], the multi-agent deep reinforcement learning based joint design of relay selection and intelligent reflecting surface reflection coefficients was investigated in IRS-assisted secure buffer-aided cooperative networks. In [18], the authors proposed several secure transmission schemes for an energy-harvesting based secure two-way relay network. The use of data and energy buffering in wireless powered relays was proposed while scheduling schemes were also designed to increase the secrecy throughput in [19]. In [20], the authors applied the reinforcement learning in the joint relay selection and power allocation in the secure cognitive radio (CR) relay network, where the data buffers and full-duplex jamming were applied at the relay nodes.

In general, there are three main techniques utilized to protect the confidential messages and improve the secrecy capacity in a cooperative network, including the beamforming [26, 27], the jamming [28, 29] and the relay selection [6, 24, 30]. In this work, we investigate the relay selection policies for achieving better security performance.

Note that a relay usually operates in either FD or half-duplex (HD) mode. In FD relaying, the relays transmit and receive at the same time and frequency, at the cost of hardware complexity [31, 32]. In HD relaying, relays are incapable of transmitting and receiving simultaneously, thus leading to reduced capacity of the whole network. Hence, we expect to achieve virtual FD communication with HD relays via link selection. Inspired by the space full-duplex max-max relay selection (SFD-MMRS) scheme in [33], which mimics FD relaying with HD relays via link selection. In this paper, we propose two novel max-ratio relay selection schemes for adaptive- and fixed-rate secure transmission in HD randomize-and-forward (RF) buffer-aided cooperative network with an eavesdropper which can intercept signals from both the source and relay nodes. It is worth noting that in such a scenario, the source-to-relay and relay-to-destination transmissions have different statistical characterizations even if the channel statistics are the same.

  • The overall basic idea of the proposed hybrid imitate full-duplex (HyIFD) max-ratio relay selection scheme is that different relays are chosen for simultaneously reception and transmission according to the ratio of the legitimate channels to the eavesdropper channels to imitate the full-duplex transmission mode. In view of the asymmetry of two-hop channel in secure communication under the full CSI assumption, the proposed HyIFD scheme switches among three sub-strategies with different preference on the two-hops according to different conditions such as relay numbers and transmit power aiming at improving the secrecy throughput performance for adaptive rate transmissions (ART).

  • The overall basic idea of the proposed threshold-based link selection (TBLS) scheme is that a hybrid HD/FD link selection policy is designed to increase the transmission probabilities of two hops under the transmission quality constraint. Two non-negative scalars were introduced to determine the threshold for choosing when the relay listens or transmits and optimized to assess the quality of both the \(S-R\) link and the \(R-D\) link in order to improve the secrecy outage probability performance for fixed rate transmissions (FRT).

A sub-optimal TBLS (SO-TBLS) scheme is then considered as a good alternative to TBLS with lower requirements for computational complexity by setting appropriate values for these two parameters. Numerical results in accordance with theoretical analysis show the superiority of the proposed schemes over the existing max-ratio schemes in terms of secrecy throughput and secrecy outage probability.

1.2 Contributions

The main contributions of this paper can be summarized as follows:

  1. 1

    We propose a novel HyIFD max-ratio relay selection scheme for ART in a secure buffer-aided RF cooperative system, in which different relays are selected for simultaneously reception and transmission to imitate the full-duplex transmission. Also, we derive the associated closed-form expressions for the secrecy throughput and obtain the asymptotic limit.

  2. 2

    We propose a TBLS max-ratio relay selection scheme for FRT in a secure buffer-aided RF multi-relay network, where HD/FD modes are switched to maximize the transmission opportunity of two hops under transmission quality constraint. We derive the closed-form expressions for the secrecy outage probability of the TBLS scheme. We also propose a sub-optimal TBLS scheme with performance close to the optimal one.

  3. 3

    Numerical results in accordance with theoretical analysis validate that the proposed schemes can further improve the secrecy throughput and secrecy outage probability performance compared with benchmark schemes. It is also shown that the relay with the best channel quality for the first-hop is preferred in the high-SNR regime while the relay with the best channel quality in the second-hop is always favored in the low-SNR regime.

1.3 Organization

The reminder of this paper is organized as follows. Section 2 presents the system model. Two existing max-ratio relay selection schemes for secure buffer-aided cooperative wireless networks are briefly introduced in Sect. 3. Section 4 gives the introduction of the HyIFD scheme, comprehensive analysis of the achievable secrecy throughput and the asymptotic closed-form expressions for the throughput performance limit. Section 5 proposes a TBLS scheme and analyzes the secrecy outage probability. Numerical results are provided in Sect. 6. Finally, conclusions are drawn in Sect. 7 with some lengthy proofs in the Appendices.

2 System model

We consider a HD two-hop wireless system formed by one source node S, a set of K RF relays \(\{R_{1},\ldots ,R_{K}\}\), one destination node D, and one eavesdropper E which can intercept signals from both the source and relay nodes, as shown in Fig. 1. All nodes are assumed to be equipped with a single antenna. Under the RF decoding strategy, the relay uses a codebook different from that used by source, so the eavesdropper can only independently decode the message received in the two hops [9]. We assume that there is a buffer of infinite length at each relay such that each relay can store the information received from the source and transmit it in later time.

We assume that the distance between the source and destination is large enough and the communications can be established only via relays. We use \(h_{sr_{k}}(t)\), \(h_{se}(t)\), \(h_{r_{k}d}(t)\) and \(h_{r_{k}e}(t)\) to denote the channel coefficients for \(S-R_k\), \(S-E\), \(R_{k}-D\) and \(R_{k}-E\) links at time t, respectively. The channel is assumed to be stationary and ergodic. We consider the Rayleigh block fading where the channel coefficients remain constant during one time slot and vary independently from one to another. In addition to fading, all wireless links are impaired by additive white Gaussian noise (AWGN) with variance \(N_0\). Without loss of generality, we assume that the noise variances at the receiving nodes are equal to one, i.e., \(N_{0}=1\). The transmit power of the source and relays are assumed to be \(P_S\) and \(P_R\), respectively.

We assume that all \(S-R_k\), \(S-E\), \(R_{k}-D\), and \(R_{k}-E\) links are independent and identically distributed (i.i.d.) fading, which is a typical assumption to facilitate analysis [21]. We assume that the mean of \(S-R_k\), \(S-E\), \(R_{k}-D\) and \(R_{k}-E\) channel gains are \({{\mathbb {E}}}[|h_{sr_{k}}|^{2}]=\gamma _{sr}\), \({{\mathbb {E}}}[|h_{se}|^{2}]=\gamma _{se}\), \({\mathbb E}[|h_{r_{k}d}|^{2}]=\gamma _{rd}\) and \({\mathbb E}[|h_{r_{k}e}|^{2}]=\gamma _{re}\), respectively, where \({\mathbb E}[\cdot ]\) denotes the expectation. Same as [16] and [24], we assume the instantaneous channel state information (CSI) of legitimate channels (i.e., \(|h_{sr_{k}}|^{2}\) and \(|h_{r_{k}d}|^{2}\)) are always known. Regarding the knowledge of eavesdropper CSI, we consider the perfect CSI case where the instantaneous eavesdropper CSI (i.e., \(|h_{se}|^{2}\) and \(|h_{r_{k}e}|^{2}\)) are known. Note however that, when the eavesdropper is passive and its behavior can not be monitored, the assumption of the exact CSI of the eavesdropper’s link might be unrealistic. We also consider the partial CSI case where only the average gains of the eavesdropping channels are available. Since the derivations are similar and much more simple, they are omitted in this paper due to the limit of space.

Fig. 1
figure 1

Illustration of system model

3 Existing relaying schemes

In this part, we review two existing relay selection protocols for secure buffer-aided cooperative wireless networks.

3.1 Max-min-ratio relay selection

With the RF relaying strategy applied at the relays, the instantaneous secrecy rate for the buffer-aided multi-relay systems is obtained as [6]

$$\begin{aligned} C_{k}(t)= \Bigg [\frac{1}{2}\mathrm{log_{2}}\max \limits _{k\in \{1,\ldots ,K\}} \left\{ {\min }\left\{ \frac{1+P_{S}|h_{sr_{k}}(t)|^{2}}{1+P_{S}|h_{se}(t)|^{2}},\frac{1+P_{R}|h_{r_{k}d}(t)|^{2}}{1+P_{R}|h_{r_{k}e}(t)|^{2}}\right\} \right\} \Bigg ]^{+}, \end{aligned}$$
(1)

where \([\cdot ]^{+}=\max \{\cdot ,0\}\). The secrecy throughput is given by \({{\mathbb {E}}}[C_{k}]\). The best relay node can be selected with the maximum \(C_{k}(t)\). This scheme is termed as the max-min-ratio relay selection. For convenience in development, the time index t is ignored in the rest of the paper unless necessary.

3.2 Max-link-ratio relay selection

This protocol chooses the best link with the highest gain ratio among all available source-to-relay and relay-to-destination links [24]. If the exact knowledge of all channels, including the eavesdropping channels \(h_{se}\) and \(h_{r_{k}e}\), are available, the max-link-ratio selects the best relay \(R_k\) as

$$\begin{aligned} k=\mathrm{arg} \max \limits _{k\in \{1,\ldots ,K\}}\left\{ \frac{\max \limits _{k\in \{1,\ldots ,K\}}\{|h_{sr_{k}}|^{2}\}}{|h_{se}|^{2}},\max \limits _{k\in \{1,\ldots ,K\}}\left\{ \frac{|h_{r_{k}d}|^{2}}{|h_{r_{k}e}|^{2}}\right\} \right\} . \end{aligned}$$
(2)

4 The proposed methods for adaptive-rate transmissions

In this section, we propose a HyIFD relay selection scheme with three modes for ART and analyze its performance in terms of secrecy throughput. Based on the overall system power constraint, we define the maximal achievable secrecy throughput and obtain the asymptotic characterizations of the maximum achievable secrecy throughput in the high-SNR regime.

4.1 Three sub-strategies of HyIFD policy

In ART, the source and relays can adjust their transmission rate according to the channel gains without causing outages. In view of the asymmetry of two-hop channel in secure communication under the full CSI assumption, we have three different modes with different preference on the two-hops.

4.1.1 Mode I

In mode I, the two hops are given the same priority and the relays with the best bottleneck link of the two hops are chosen in each time slot. Specifically, this mode is similar to [33] whereas the eavesdropper channel is also included. First, we set the best and the second best relay for reception \(R_{r_{1}}\) and \(R_{r_{2}}\) respectively based on

$$\begin{aligned}r_1 &= \arg\mathop {\max} \limits _{k\in \{1,\ldots ,K\}}\left\{ \frac{1+P_{S}|h_{sr_{k}}|^{2}}{1+P_{S}|h_{se}|^{2}}\right\}, \end{aligned}$$
(3)
$$\begin{aligned}r_2&=\arg \mathop{\max}\limits_{{k\ne r_1}{k\in \{1, \ldots , K\}}} \left\{ \frac{1+P_{S}|h_{sr_{k}}|^{2}}{1+P_{S}|h_{se}|^{2}}\right\}, \end{aligned}$$
(4)

and then set the best and the second best relay for transmission \(R_{t_{1}}\) and \(R_{t_{2}}\) respectively according to

$$\begin{aligned} t_1&={\mathrm{arg}} \max \limits _{k\in \{1,\ldots ,K\}}\left\{ \frac{1+P_{R}|h_{r_{k}d}|^{2}}{1+P_{R}|h_{r_{k}e}|^{2}}\right\} , \end{aligned}$$
(5)
$$\begin{aligned} t_2&=\arg \mathop{\max}\limits_{{k\ne t_1}{k\in \{1, \ldots , K\}}} \left\{ \frac{1+P_{R}|h_{r_{k}d}|^{2}}{1+P_{R}|h_{r_{k}e}|^{2}}\right\} . \end{aligned}$$
(6)

Denote

$$\begin{aligned}z_{r_1}&=\frac{\mathop{\max}\limits_{k\in \{1,\ldots ,K\}}\left\{ 1+P_{S}|h_{sr_{k}}|^{2}\right\} }{1+P_{S}|h_{se}|^{2}}, \end{aligned}$$
(7)
$$\begin{aligned}z_{r_2}&=\frac{\mathop{\max}\limits_{{k\ne r_1}{k\in \{1, \ldots , K\}}} \left\{ 1+P_{S}|h_{sr_{k}}|^{2}\right\} }{1+P_{S}|h_{se}|^{2}}, \end{aligned}$$
(8)
$$\begin{aligned}z_{t_1}&=\max \limits _{k\in \{1,\ldots ,K\}}\left\{ \frac{1+P_{R}|h_{r_{k}d}|^{2}}{1+P_{R}|h_{r_{k}e}|^{2}}\right\} , \end{aligned}$$
(9)
$$\begin{aligned}z_{t_2}&=\mathop{\max}\limits_{{k\ne t_1}{k\in \{1, \ldots , K\}}} \left\{ \frac{1+P_{R}|h_{r_{k}d}|^{2}}{1+P_{R}|h_{r_{k}e}|^{2}}\right\} . \end{aligned}$$
(10)

Let

$$\begin{aligned} Q=\min \{z_{r_1}, z_{t_2}\}-\min \{z_{r_2}, z_{t_1}\}. \end{aligned}$$
(11)

When the same relay share the best \(S-R\) and the best \(R-D\) channel, we would like to choose between the following two possibilities. One is to select the relay with the second best \(S-R\) channel \(R_{r_{2}}\) and the relay with the best \(R-D\) channel \(R_{t_{1}}\) for reception and transmission, respectively. The other is to select the relay with the best \(S-R\) channel \(R_{r_{1}}\) and the relay with the second best \(R-D\) channel \(R_{t_{2}}\) for reception and transmission, respectively. And the value Q defined here is used to indicate that which of the two options with the better bottleneck link.

Then, in the mode I, the relays selected for reception \(R_{{\bar{r}}}\) and transmission \(R_{{\bar{t}}}\) are chosen as

$$\begin{aligned} (R_{{\bar{r}}}, R_{{\bar{t}}})= {\left\{ \begin{array}{ll} (R_{r_1}, R_{t_1}),& {\text {if}} \quad r_1\ne t_1\\ (R_{r_1}, R_{t_2}),& {\text {if}} \quad r_1= t_1 \; \text {and} \; Q>0\\ (R_{r_2}, R_{t_1}),& {\text {otherwise}}. \end{array}\right. } \end{aligned}$$
(12)

4.1.2 Mode II

In the mode II, the best \(S-R\) link will always be selected if the same relay is the best relay for both the S-R and R-D links, and the relays selected for reception \(R_{{\bar{r}}}\) and transmission \(R_{{\bar{t}}}\) are chosen as

$$\begin{aligned} (R_{{\bar{r}}}, R_{{\bar{t}}})= {\left\{ \begin{array}{ll} (R_{r_1}, R_{t_1}),& {\text {if}} \quad r_1\ne t_1\\ (R_{r_1}, R_{t_2}),& {\text {otherwise}}. \end{array}\right. } \end{aligned}$$
(13)

4.1.3 Mode III

In the mode III, the \(R-D\) link is given higher priority, and the relays selected for reception \(R_{{\bar{r}}}\) and transmission \(R_{{\bar{t}}}\) are chosen as

$$\begin{aligned} (R_{{\bar{r}}}, R_{{\bar{t}}})= {\left\{ \begin{array}{ll} (R_{r_1}, R_{t_1}),& {\text {if}} \quad r_1\ne t_1\\ (R_{r_2}, R_{t_1}),& {\text {otherwise}}. \end{array}\right. } \end{aligned}$$
(14)

Besides, we should note that because of the buffers used at the relay, the proposed scheme introduces a delay in the network. It is expected that when more relays are employed in the network and no delay constraint is imposed, some packets may experience increased delays. The better secrecy throughput performance may at the cost of higher average delay. The analysis of involving average delay in the design would be interesting and are left for future research. For instance, statistical delay constraints can be considered [34,35,36].

4.2 Secrecy throughput analysis

In this part, we perform the secrecy throughput analysis for the above three modes, respectively.

4.2.1 Mode I

Considering that we employ the RF relaying strategy [8], the eavesdropper cannot combine the data transmitted by source and relay at each time slot. Same as [33], we assume that there is no inter-relay links and also no inter-relay interference when the receiving and transmitting relays are active in the same time-slot. In practice, this assumption is valid if the relays are located far away from each other or if fixed infrastructure-based relays with directional antennas are used [37]. Therefore, when either the source wishes to transmit confidential information to the relay or the relay sends private message to the destination, it can be viewed as a single hop transmission in the presence of the interference from the other hop.

Assuming that the eavesdropper employs decoding with successful interference cancellation and the decoding order at the eavesdropper is not known at the source or the relays, the maximum eavesdropping data rate is assumed to be upperbounded by \(\log _{2}(1+P_{S}|h_{se}|^{2})\) for the link \(S-E\), and \(\log _{2}(1+P_{R}|h_{r_{k}e}|^{2})\) for the link \(R_{k}-E\). If the relay \(R_k\) is selected for the data transmission, the instantaneous secrecy rate of the first and second hop are lowerbounded by

$$\begin{aligned} C_{SR}&\ge {} \left[ \mathrm{log_{2}}\left( \frac{1+P_{S}|h_{sr_{k}}|^{2}}{1+P_{S}|h_{se}|^{2}}\right) \right] ^{+}, \end{aligned}$$
(15)
$$\begin{aligned} C_{RD} &\ge {} \left[ \mathrm{log_{2}}\left( \frac{1+P_{R}|h_{r_{k}d}|^{2}}{1+P_{R}|h_{r_{k}e}|^{2}}\right) \right] ^{+}, \end{aligned}$$
(16)

respectively. In the following, we adopt the lowerbound for the analysis, which represents the worst case and specifies the minimum throughput achievable.

The secrecy throughput for the buffer-aided multi-relay system is given by [38]

$$\begin{aligned} C_s={\min}\{{{\mathbb {E}}}[C_{SR}], {\mathbb {E}}[C_{RD}]\}, \end{aligned}$$
(17)

where \({{\mathbb {E}}}[C_{SR}]\) and \({{\mathbb {E}}}[C_{RD}]\) denote the average secrecy throughput of the \(S-R\) and \(R-D\) links, respectively.

The average secrecy rate of the first and second hop, \({\overline{C}}_{k}\), \(k\in \{SR,RD\}\), can be expressed as [33, (9)]

$$\begin{aligned} {\overline{C}}_{k}={\mathbb {E}}[C_{k}]=(1-p_{s}){\overline{C}}_{k,1}+p_{s}({\overline{C}}_{k,21}+{\overline{C}}_{k,22}), \end{aligned}$$
(18)

where \(p_s\) denote the probability that \(r_1=t_1\), \({\overline{C}}_{k,1}\) is the average throughput of the best channel of the first and second hop, \(k\in \{SR,RD\}\), \({\overline{C}}_{k,21}\) and \({\overline{C}}_{k,22}\) denote the average throughput of the best channel and the second best channel of the first and second hop when \(Q>0\) and \(Q<0\), respectively.

Note that our selection policy involves eight independent channel coefficients, and hence finding the closed-form expressions is very tricky, if not intractable. So we derive the approximate closed-form expressions for the average secrecy throughput of the mode I.

The approximate secrecy throughput for the mode I is given by

$$\begin{aligned} C_{\text {I}}={\min}\{{{\mathbb {E}}}[C_{SR}^{\text {I}}], {\mathbb E}[C_{RD}^{\text {I}}]\}. \end{aligned}$$
(19)

Proposition 1

The average secrecy rate of the first hop for mode I can be approximately expressed as

$$\begin{aligned}&{{\mathbb {E}}}[C_{SR}^{\text {I}}] \approx (1-p_{s}){\mathbb E}[C_{SR,1}]+p_{s}(p_{12}{{\mathbb {E}}}[C_{SR,1}]+p_{21}{\mathbb E}[C_{SR,2}]), \end{aligned}$$
(20)

where \(p_s\) denotes the probability that \(r_1=t_1\), \(p_{12}\) denotes the probability that \(Q>0\), \(p_{21}\) denotes the probability that \(Q<0\), i.e., \(p_{21}=1-p_{12}\), \({{\mathbb {E}}}[C_{SR,1}]\) and \({{\mathbb {E}}}[C_{SR,2}]\) denote the average secrecy capacity of the best and the second best \(S-R\) channel, respectively. Similarly, the average secrecy rate of the second hop for mode I can be approximately given as

$$\begin{aligned}&{{\mathbb {E}}}[C_{RD}^{\text {I}}] \approx (1-p_{s}){\mathbb E}[C_{RD,1}]+p_{s}(p_{12}{{\mathbb {E}}}[C_{RD,2}]+p_{21}{\mathbb E}[C_{RD,1}]), \end{aligned}$$
(21)

where \({{\mathbb {E}}}[C_{RD,1}]\) and \({{\mathbb {E}}}[C_{RD,2}]\) denote the average secrecy capacity of the best and the second best \(R-D\) channel, respectively.

Proof

Based on (12), we can divide the time index t into three cases correspondingly. If \(r_{1}\ne t_{1}\), we select the relay \(R_{r_1}\) for reception and the relay \(R_{t_1}\) for transmission. We denote such indices as \(t\in \Omega _{1}\). If \(r_{1}=t_{1}\), we need to determine whether Q is positive or negative. If \(Q>0\), we select the relay \(R_{r_1}\) for reception and the relay \(R_{t_2}\) for transmission. We denote such time indices as \(t\in \Omega _{2}\). Inversely, if \(Q<0\), we select the relay \(R_{r_2}\) for reception and \(R_{t_1}\) for transmission, and denote such time indices as \(t\in \Omega _{3}\). Let \(N_{1}\) denote the number of times in N transmissions that \(r_{1}=t_{1}\), and hence \(N_{12}\) denote the number of time instances in \(N_{1}\) transmissions that \(Q>0\), and \(N_{21}\) denote the number of time instances in \(N_{1}\) transmissions that \(Q<0\), i.e., \(p_{s}=\frac{N_{1}}{N}\), \(p_{12}=\frac{N_{12}}{N_{1}}\), and \(p_{21}=\frac{N_{21}}{N_{1}}=1-p_{12}\).

The average secrecy rate of the first hop is given by

$$\begin{aligned} E[C_{SR}^{\text {I}}]&=\lim \limits _{N\rightarrow \infty }\frac{1}{N}\sum \limits _{t=1}^{N}C_{SR}(t) \ \nonumber \\&=\lim \limits _{N\rightarrow \infty }\frac{1}{N}\left( \sum \limits _{t\in \Omega _{1}}C_{SR_{r_1}}(t)+\sum \limits _{t\in \Omega _{2}}C_{SR_{r_1}}(t)+\sum \limits _{t\in \Omega _{3}}C_{SR_{r_2}}(t) \right) \ \nonumber \\&=\lim \limits _{N\rightarrow \infty }\frac{N-N_{1}}{N}\cdot \frac{1}{N-N_{1}}\sum \limits _{t\in \Omega _{1}}C_{SR}(t) +\frac{N_{1}}{N}\cdot \frac{N_{12}}{N_{1}}\frac{1}{N_{12}}\sum \limits _{t\in \Omega _{2}}C_{SR}(t) \ \nonumber \\&\quad +\frac{N_{1}}{N}\cdot \frac{N_{21}}{N_{1}}\frac{1}{N_{21}}\sum \limits _{t\in \Omega _{3}}C_{SR}(t) \ \nonumber \\&=(1-p_{s}){{\mathbb {E}}}[C_{SR,1}]+p_{s}\cdot p_{12}{\mathbb E}[C_{SR,1}]+p_{s}\cdot p_{21}{{\mathbb {E}}}[C_{SR,2}]. \end{aligned}$$
(22)

The average secrecy rate of the second hop can be proved by the same logic. \(\square\)

Proposition 2

Given \(P_{S}\) and \(P_{R}\), the detailed expressions for the terms in (20) and (21) can be expressed as follows:

$$\begin{aligned}&p_{s}=\frac{1}{K}, \end{aligned}$$
(23)
$$\begin{aligned}&\quad {{\mathbb {E}}}[C_{SR,1}] =\sum \limits _{r=1}^{K}\left( {\begin{array}{c}K\\ r\end{array}}\right) (-1)^{r}\frac{e^{\frac{r}{P_{S}\gamma _{sr}}}}{\ln 2}\bigg [-E_{1}\left( \frac{r}{P_{S}\gamma _{sr}}\right) +e^{\frac{1}{P_{S}\gamma _{se}}}E_{1}\left( \frac{r}{P_{S}\gamma _{sr}}+\frac{1}{P_{S}\gamma _{se}}\right) \bigg ], \end{aligned}$$
(24)
$$\begin{aligned}&{{\mathbb {E}}}[C_{SR,2}]=\sum \limits _{r=1}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\frac{e^{\frac{r}{P_{S}\gamma _{sr}}}}{\ln 2} \left[ -E_{1}\left( \frac{r}{P_{S}\gamma _{sr}}\right) +e^{\frac{1}{P_{S}\gamma _{se}}}E_{1}\left( \frac{r}{P_{S}\gamma _{sr}}+\frac{1}{P_{S}\gamma _{se}}\right) \right] \nonumber \\&\quad +\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\frac{e^{\frac{r+1}{P_{S}\gamma _{sr}}}}{\ln 2} \left[ -E_{1}\left( \frac{r+1}{P_{S}\gamma _{sr}}\right) +e^{\frac{1}{P_{S}\gamma _{se}}}E_{1}\left( \frac{r+1}{P_{S}\gamma _{sr}}+\frac{1}{P_{S}\gamma _{se}}\right) \right] , \end{aligned}$$
(25)
$$\begin{aligned}&{{\mathbb {E}}}[C_{RD,1}] =\sum \limits _{r=1}^{K}\left( {\begin{array}{c}K\\ r\end{array}}\right) (-1)^{r}\frac{\gamma _{re}e^{\frac{r}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) }}{\ln 2\gamma _{rd}} \Bigg [-e^{-\frac{r}{P_{R}\gamma _{re}}}E_{1}\left( \frac{r}{P_{R}\gamma _{rd}}\right) \nonumber \\&\quad +\sum \limits _{i=1}^{r}\bigg (\frac{(-1)^{i+1}\left( \frac{r}{P_{R}\gamma _{re}}\right) ^{i-1}E_{1}\left( \frac{r}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) \right) }{(i-1)!} \nonumber \\&\quad +\frac{e^{-\frac{r}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) }}{\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{i-1}} \sum \limits _{j=0}^{i-2}\frac{(-1)^{j}\left( \frac{r}{P_{R}\gamma _{re}}\right) ^{j}\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{j}}{(i-1)(i-2)\ldots (i-1-j)}\bigg )\Bigg ], \end{aligned}$$
(26)
$$\begin{aligned}&{{\mathbb {E}}}[C_{RD,2}] =\sum \limits _{r=1}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\frac{\gamma _{re}e^{\frac{r}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) }}{\ln 2\gamma _{rd}} \Bigg [-e^{-\frac{r}{P_{R}\gamma _{re}}}E_{1}\left( \frac{r}{P_{R}\gamma _{rd}}\right) \nonumber \\&\quad +\sum \limits _{i=1}^{r}\bigg (\frac{(-1)^{i+1}\left( \frac{r}{P_{R}\gamma _{re}}\right) ^{i-1}E_{1}\left( \frac{r}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) \right) }{(i-1)!} +\frac{e^{-\frac{r}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) }}{\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{i-1}} \nonumber \\&\quad \sum \limits _{j=0}^{i-2}\frac{(-1)^{j}\left( \frac{r}{P_{R}\gamma _{re}}\right) ^{j}\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{j}}{(i-1)(i-2)\ldots (i-1-j)}\bigg )\Bigg ] +\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\frac{\gamma _{re}e^{\frac{r+1}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) }}{\ln 2\gamma _{rd}} \nonumber \\&\quad \Bigg [-e^{-\frac{r+1}{P_{R}\gamma _{re}}}E_{1}\left( \frac{r+1}{P_{R}\gamma _{rd}}\right) +\sum \limits _{i=1}^{r+1}\bigg (\frac{(-1)^{i+1}\left( \frac{r+1}{P_{R}\gamma _{re}}\right) ^{i-1}E_{1}\left( \frac{r+1}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) \right) }{(i-1)!} \nonumber \\&\quad +\frac{e^{-\frac{r+1}{P_{R}}\left( \frac{1}{\gamma _{rd}}+\frac{1}{\gamma _{re}}\right) }}{\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{i-1}} \sum \limits _{j=0}^{i-2}\frac{(-1)^{j}\left( \frac{r+1}{P_{R}\gamma _{re}}\right) ^{j}\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{j}}{(i-1)(i-2)\ldots (i-1-j)}\bigg )\Bigg ], \end{aligned}$$
(27)
$$\begin{aligned}&p_{12}=\int _{1}^{\infty }f_{Z_{r_2}}(z)(1-F_{Z_{t_2}}(z))dz, \end{aligned}$$
(28)

where

$$\begin{aligned} f_{Z_{r_2}}(z)&=\sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}e^{-\frac{(z-1)r}{P_{S}\gamma _{sr}}} \left( \frac{-\frac{r}{P_{S}\gamma _{sr}}}{1+\frac{\gamma _{se}r}{\gamma _{sr}}z}-\frac{\frac{\gamma _{se}r}{\gamma _{sr}}}{\left( 1+\frac{\gamma _{se}r}{\gamma _{sr}}z\right) ^{2}}\right) \nonumber \\&\quad +\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}e^{-\frac{(z-1)(r+1)}{P_{S}\gamma _{sr}}}\left( \frac{-\frac{r+1}{P_{S}\gamma _{sr}}}{1+\frac{\gamma _{se}(r+1)}{\gamma _{sr}}z}-\frac{\frac{\gamma _{se}(r+1)}{\gamma _{sr}}}{\left( 1+\frac{\gamma _{se}(r+1)}{\gamma _{sr}}z\right) ^{2}}\right) , \end{aligned}$$
(29)
$$\begin{aligned} F_{Z_{t_2}}(z)&=\left( 1-\frac{e^{-\frac{z-1}{P_{R}\gamma _{rd}}}}{1+\frac{\gamma _{re}z}{\gamma _{rd}}}\right) ^{K-1}\left( 1+\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \frac{e^{-\frac{z-1}{P_{R}\gamma _{rd}}}}{1+\frac{\gamma _{re}z}{\gamma _{rd}}}\right) . \end{aligned}$$
(30)

Proof

Please see Appendix A. \(\square\)

Remark 1

Note that \({{\mathbb {E}}}[C_{SR}^{\text {I}}]\) and \({\mathbb E}[C_{RD}^{\text {I}}]\) can be obtained by substituting the above equations into (20) and (21). Finally, the approximate closed-form expression of the secrecy throughput for the mode I is obtained by substituting (20) and (21) into (19).

4.2.2 Mode II

The secrecy throughput for the mode II can be expressed as

$$\begin{aligned} C_{\text {II}}={\min}\{{{\mathbb {E}}}[C_{SR}^{\text {II}}], {\mathbb E}[C_{RD}^{\text {II}}]\}, \end{aligned}$$
(31)

Based on (13), the average secrecy rate of the first hop for the mode II is given by

$$\begin{aligned}&{{\mathbb {E}}}[C_{SR}^{\text {II}}]={{\mathbb {E}}}[C_{SR,1}], \end{aligned}$$
(32)

And the average secrecy rate of the second hop for the mode II can be expressed as

$$\begin{aligned}&{{\mathbb {E}}}[C_{RD}^{\text {II}}]=(1-p_{s}){\mathbb E}[C_{RD,1}]+p_{s}{{\mathbb {E}}}[C_{RD,2}], \end{aligned}$$
(33)

Note that \({{\mathbb {E}}}[C_{SR}^{\text {II}}]\) and \({\mathbb E}[C_{RD}^{\text {II}}]\) can be obtained by substituting the Eqs. (23), (24), (26) and (27) into (32) and (33), respectively. Finally, the approximate closed-form expression of the secrecy throughput for the mode II is obtained by substituting (32) and (33) into (31).

4.2.3 Mode III

The secrecy throughput of mode III can be expressed as

$$\begin{aligned} C_{\text {III}}={\min}\{{{\mathbb {E}}}[C_{SR}^{\text {III}}], {\mathbb E}[C_{RD}^{\text {III}}]\}, \end{aligned}$$
(34)

Based on (14), the average secrecy rate of the first hop for the mode III can be expressed as

$$\begin{aligned}&{{\mathbb {E}}}[C_{SR}^{\text {III}}]=(1-p_{s}){\mathbb E}[C_{SR,1}]+p_{s}{{\mathbb {E}}}[C_{SR,2}], \end{aligned}$$
(35)

And the average secrecy rate of the second hop for the mode III can be expressed as

$$\begin{aligned}&{{\mathbb {E}}}[C_{RD}^{\text {III}}]={\mathbb E}[C_{RD,1}], \end{aligned}$$
(36)

Note that \({{\mathbb {E}}}[C_{SR}^{\text {III}}]\) and \({\mathbb E}[C_{RD}^{\text {III}}]\) can be obtained by substituting the Eqs. (23), (24), (25) and (26) into (35) and (36) respectively. Finally, the approximate closed-form expression of the secrecy throughput for mode III is obtained by substituting (35) and (36) into (34).

It is worth noting that the values of \(C_{\text {I}}\), \(C_{\text {II}}\), and \(C_{\text {III}}\) only depend on the transmit power values, the total number of relays K, and the channel statistics. Therefore, given these parameters, we can compute the values of \(C_{\text {I}}\), \(C_{\text {II}}\), and \(C_{\text {III}}\) offline and conduct the following design on the optimal power allocation in advance.

Given the total power constraint denoted as SNR of the network, we can allocate the total power to the source and relays to achieve the best performance.

  • HyIFD: We ought to allocate transmit energy to source and K relays. The sources work for all time slots, therefore, we should have \((P_{S}+KP_{R}) \le \mathrm{SNR}\).

  • Max-Link-Ratio: We are supposed to allocate transmit power to the source and K relays for each time slot to enable each link to be capable of being selected for reception or transmission, so we should have \((P_{S}+KP_{R}) \le \mathrm{SNR}\) as well.

  • Max-Min-Ratio: We should allocate transmit energy to the source and K relays, albeit the data transmission occupies two time slots, so we should have \(\frac{1}{2}(P_{S}+KP_{R}) \le \mathrm{SNR}\).

Consider the derived expressions of secrecy throughput. Once given the total power SNR, it is obvious that when \(P_{S}\) is small, the throughput is limited by first hop. On the other hand, when \(P_R\) is small, the second hop will be the bottleneck of the system. Therefore, there is always an optimal power allocation that maximizes the secrecy throughput.

Definition 1

The maximum secrecy throughput of the mode I is given by

$$\begin{aligned} C_{\text {I}}^{\max}=\max \limits _{(P_{S}+KP_{R}) \le SNR}C_{\text {I}}(P_{S},P_{R}). \end{aligned}$$
(37)

Similarly, we can define the maximum secrecy throughput for mode II and mode III, which can be denoted as \(C_{\text {II}}^{\max}\) and \(C_{\text {III}}^{\max}\), respectively. And the maximum secrecy throughput for the max-min-ratio scheme and max-link-ratio scheme can be defined in the same way.

4.3 HyIFD policy

The proposed HyIFD scheme can finally be expressed as

$$\begin{aligned}HyIFD=\arg\mathop{\max}\limits_{i\in {\text {I,II,III}}} C_{i}^{\max}. \end{aligned}$$
(38)

That is, the HyIFD policy selects mode i which maximizes the secrecy throughput.

4.4 Asymptotic analysis

In this part, to see the performance gain more clearly, we perform the asymptotic analysis for the maximum achievable secrecy throughput of the proposed HyIFD scheme in the high-SNR regime. Let \({\widehat{C}}_{i}^{j}\) denote the average secrecy rate of the i-th hop for mode j of the proposed HyIFD scheme in the high SNR regime, with \(i\in \{SR,RD\}\) and \(j\in \{\text {I},\text {II},\text {III}\}\). We have the following result.

Theorem 1

The maximum achievable secrecy throughput of the proposed mode I as the total power SNR increases, is upperbounded by \(C_{\text {I}}^{limit}\), which is given by

$$\begin{aligned}&C_{\text {I}}^{limit}={\min}\{{\widehat{C}}_{SR}^{\text {I}}, {\widehat{C}}_{RD}^{\text {I}}\}, \end{aligned}$$
(39)
$$\begin{aligned}&{\widehat{C}}_{SR}^{\text {I}} \approx (1-p_{s}){\widehat{C}}_{SR,1}+p_{s}({\widehat{p}}_{12}{\widehat{C}}_{SR,1}+{\widehat{p}}_{21}{\widehat{C}}_{SR,2}), \end{aligned}$$
(40)
$$\begin{aligned}&{\widehat{C}}_{RD}^{I} \approx (1-p_{s}){\widehat{C}}_{RD,1}+p_{s}({\widehat{p}}_{12}{\widehat{C}}_{RD,2}+{\widehat{p}}_{21}{\widehat{C}}_{RD,1}), \end{aligned}$$
(41)

where

$$\begin{aligned}&{\widehat{C}}_{SR,1} =\sum \limits _{r=1}^{K}\left( {\begin{array}{c}K\\ r\end{array}}\right) (-1)^{r+1}\frac{\ln \left( 1+\frac{\gamma _{sr}}{r\gamma _{se}}\right) }{\ln 2}, \end{aligned}$$
(42)
$$\begin{aligned}&{\widehat{C}}_{SR,1} =\sum \limits _{r=1}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\frac{\ln \left( \frac{1}{1+\frac{\gamma _{sr}}{r\gamma _{se}}}\right) }{\ln 2} +\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r+1}\frac{\ln \left( 1+\frac{\gamma _{sr}}{(r+1)\gamma _{se}}\right) }{\ln 2}, \end{aligned}$$
(43)
$$\begin{aligned}{\widehat{C}}_{RD,1} &=\sum \limits _{r=1}^{K}\left( {\begin{array}{c}K\\ r\end{array}}\right) (-1)^{r}\frac{\gamma _{re}}{\ln 2\gamma _{rd}} \left[-\ln \left( 1+\frac{\gamma _{rd}}{\gamma _{re}}\right) +\sum \limits _{i=2}^{r}\left (\frac{1}{(i-1)\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{i-1}}\right )\right ], \end{aligned}$$
(44)
$$\begin{aligned}{\widehat{C}}_{RD,2} &=\sum \limits _{r=1}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\frac{\gamma _{re}}{\ln 2\gamma _{rd}} \left[-\ln \left( 1+\frac{\gamma _{rd}}{\gamma _{re}}\right) +\sum \limits _{i=2}^{r}\left(\frac{1}{(i-1)\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{i-1}}\right)\right] \nonumber \\&\quad +\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\frac{\gamma _{re}}{\ln 2\gamma _{rd}} \left[-\ln \left( 1+\frac{\gamma _{rd}}{\gamma _{re}}\right) +\sum \limits _{i=2}^{r+1}\left(\frac{1}{(i-1)\left( \frac{\gamma _{re}}{\gamma _{rd}}+1\right) ^{i-1}}\right)\right], \end{aligned}$$
(45)
$$\begin{aligned}&{\widehat{p}}_{12} =\int _{1}^{\infty }{\widehat{f}}_{Z_{r_2}}(z)(1-{\widehat{F}}_{Z_{t_2}}(z))dz, \end{aligned}$$
(46)

with

$$\begin{aligned} {\widehat{f}}_{Z_{r_2}}(z)&=\sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r} \left( -\frac{\frac{\gamma _{se}r}{\gamma _{sr}}}{\left( 1+\frac{\gamma _{se}r}{\gamma _{sr}}z\right) ^{2}}\right) \ \nonumber \\&\quad +\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \sum \limits _{r=0}^{K-1}\left( {\begin{array}{c}K-1\\ r\end{array}}\right) (-1)^{r}\left( -\frac{\frac{\gamma _{se}(r+1)}{\gamma _{sr}}}{\left( 1+\frac{\gamma _{se}(r+1)}{\gamma _{sr}}z\right) ^{2}}\right) , \end{aligned}$$
(47)
$$\begin{aligned} {\widehat{F}}_{Z_{t_2}}(z)&=\left( 1-\frac{1}{1+\frac{\gamma _{re}z}{\gamma _{rd}}}\right) ^{K-1}\left( 1+\frac{\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) }{1+\frac{\gamma _{re}z}{\gamma _{rd}}}\right) . \end{aligned}$$
(48)

Proof

Please see Appendix B. \(\square\)

Corollary 1

The performance limit to the maximum achievable secrecy throughput for the mode II and mode III can be obtained by

$$\begin{aligned}&C_{\text {II}}^{limit}={\min}\{{\widehat{C}}_{SR}^{\text {II}}, {\widehat{C}}_{RD}^{\text {II}}\}, \end{aligned}$$
(49)
$$\begin{aligned}&C_{\text {III}}^{limit}={\min}\{{\widehat{C}}_{SR}^{\text {III}}, {\widehat{C}}_{RD}^{\text {III}}\}, \end{aligned}$$
(50)

where

$$\begin{aligned}&{\widehat{C}}_{SR}^{\text {II}}={\widehat{C}}_{SR,1}, \end{aligned}$$
(51)
$$\begin{aligned}&{\widehat{C}}_{RD}^{\text {II}}=(1-p_{s}){\widehat{C}}_{RD,1}+p_{s}{\widehat{C}}_{RD,2}, \end{aligned}$$
(52)
$$\begin{aligned}&{\widehat{C}}_{SR}^{\text {III}}=(1-p_{s}){\widehat{C}}_{SR,1}+p_{s}{\widehat{C}}_{SR,2}, \end{aligned}$$
(53)
$$\begin{aligned}&{\widehat{C}}_{RD}^{\text {III}}={\widehat{C}}_{RD,1}, \end{aligned}$$
(54)

Note that \({\widehat{C}}_{SR}^{\text {II}}\) and \({\widehat{C}}_{RD}^{\text {II}}\) can be obtained by substituting the Eqs. (23), (42), (44) and (45) into (51) and (52), respectively. Then the asymptotic closed-form expression for the maximum achievable secrecy throughput limit of mode II is obtained by substituting (51) and (52) into (49). And \(C_{\text {III}}^{limit}\) can be obtained in a similar way.

Proof

The proof is similar to that for mode I and hence is omitted here.

Finally, the closed-form expressions for the limit to the maximum achievable secrecy throughput of the proposed HyIFD scheme, which is denoted as \(C_{HyIFD}^{limit}\), can be obtained by

$$\begin{aligned} C_{HyIFD}^{limit}=\max \{C_{\text {I}}^{limit},C_{\text {II}}^{limit},C_{\text {III}}^{limit}\}. \end{aligned}$$
(55)

\(\square\)

It can be seen from the above formula that when the transmit power is relatively large, the secrecy throughput no longer increases with the transmit power, but only depends on the number of available relays and channel statistics. This is easy to understand because the increase in the transmit power is beneficial not only to the legitimate receiver but also to the eavesdropper, and the secrecy throughput is limited mainly by the difference in channel quality between the legitimate channels and eavesdropper channels. It is worth noting that the designed HyIFD policy takes into account both acquiring a larger channel gain ratio and balancing the gain of the two hops by switching between the three modes according to different conditions such as transmit power and channel statistics, thus can be seen as a more flexible and comprehensive scheme for such a system.

5 The proposed methods for fixed-rate transmissions

In this section, we first propose a novel link selection policy for FRT and analyze its performance in terms of secrecy outage probability (SOP). Subsequently, a sub-optimal TBLS scheme with lower computational complexity is provided as well.

5.1 Link selection policy

In FRT, the source and relays transmit with a constant rate \(R_{s}\), and the relevant performance metric is the outage probability \(P_{out}\). As another the most commonly used security measure for wiretap channels, SOP provides an idea about the fraction of fading realizations for which the channel can support a certain rate (or user’s desired rate). Aiming at improving the SOP performance for FRT, we propose a TBLS scheme where two non-negative scalars \(\lambda\) and \(\mu\) are introduced to determine the threshold for choosing when the relay listens or transmits. The conditions are used to assess the quality of both the \(S-R\) link and the \(R-D\) link in order to provide good SOP performance.

In the proposed TBLS scheme, the relays selected for reception \(R_{{\bar{r}}}\) and transmission \(R_{{\bar{t}}}\) are chosen as

$$\begin{aligned} (R_{{\bar{r}}}, R_{{\bar{t}}})= {\left\{ \begin{array}{ll} (R_{r_1},R_{t_1}), {\text {if}} \; z_{r_1}\ge \lambda \; \text {and} \; z_{t_1}\ge \mu \; \text {and} \; r_{1}\ne t_{1} \\ (R_{r_1},R_{t_2}), {\text {if}} \; z_{r_1}\ge \lambda \; \text {and} \; z_{t_2}\ge \mu \; \text {and} \; r_{1}=t_{1} \\ (R_{r_1},0), {\text {if}} \; z_{r_1}\ge \lambda \; \text {and} \; z_{t_1}\ge \mu >z_{t_2} \; \text {and} \; r_{1}=t_{1} \ \text {or} \ {\text {if}} \; z_{r_1}\ge \lambda \; \text {and} \; z_{t_1}<\mu \\ (0,R_{t_1}), {\text {if}} \; z_{r_1}<\lambda \; \text {and} \; z_{t_1}\ge \mu \\ (0,0), \text {otherwise,} \end{array}\right. } \end{aligned}$$
(56)

where \(z_{r_1}\), \(z_{t_1}\), and \(z_{t_2}\) have been defined in (7), (9), and (10), respectively. Obviously, this scheme is a hybrid HD/FD relaying scheme, which adapts reception and transmission time slots based on channel quality. Under the premise of ensuring transmission quality, the proposed TBLS scheme selects two relays for reception and transmission respectively if possible, which considers both the transmission efficiency and security.

5.2 Secrecy outage probability analysis

In this part, we perform the SOP analysis for the proposed TBLS scheme. The SOP is defined as the probability that the instantaneous secrecy capacity falls below a target secrecy rate \(R_{s}\), i.e., the equivalent instantaneous z falls below a certain threshold \(z_{th}\) such that error-free transmission with rate \(R_{s}\) is not possible [41], i.e., \(P_{out}= P(z\le z_{th})\).

Proposition 3

The SOP for the proposed TBLS scheme can be expressed as

$$\begin{aligned} P_{out}&=(1-p_{s})P\{\min \{z_{r_1}, z_{t_1}\}< z_{th_1}, z_{r_1}\ge \lambda , z_{t_1}\ge \mu \} \ \nonumber \\&\quad +p_{s}P\{\min \{z_{r_1}, z_{t_2}\}< z_{th_1}, z_{r_1}\ge \lambda , z_{t_2}\ge \mu \} \ \nonumber \\&\quad +p_{s}P\{z_{r_1}<z_{th_2}, z_{r_1}\ge \lambda , z_{t_1}\ge \mu >z_{t_2}\} +P\{z_{r_1}<z_{th_2}, z_{r_1}\ge \lambda , z_{t_1}<\mu \} \ \nonumber \\&\quad +P\{z_{t_1}<z_{th_2}, z_{r_1}<\lambda , z_{t_1}\ge \mu \}+P\{ z_{r_1}<\lambda , z_{t_1}<\mu \}, \end{aligned}$$
(57)

where \(z_{th_1}=2^{R_{s}}\) and \(z_{th_2}=2^{2R_{s}}\).

Proof

Please see Appendix C. \(\square\)

Note that when \(\lambda =\mu =z_{th_2}\), the proposed scheme only fails to transmit data when both \(z_{r_1}\) and \(z_{t_1}\) are less than \(z_{th_2}\). This scheme reduces to a scheme similar to max-link-ratio selection scheme, the secrecy outage performance is the same, i.e., \(P_{out}=P\{ z_{r_1}<z_{th_2}, z_{t_1}<z_{th_2}\}=P\{\max \{z_{r_1},z_{t_1}\}<z_{th_2}\}\), but with one difference that, the max-link-ratio selection scheme only selects one link for one time slot while the proposed TBLS scheme selects two if possible, i.e., the transmission probabilities of the first and the second hop of TBLS are definitely higher than that of the max-link-ratio scheme, so is the throughput.

Proposition 4

Given the policy, i.e., \(\lambda\) and \(\mu\), the closed-form expressions for the SOP of the proposed TBLS scheme is given by

$$\begin{aligned} P_{out}= \left\{ \begin{array}{ll} F_{Z_{r_1}}(\lambda )F_{Z_{t_1}}(\mu ), &{} \lambda \ge z_{th_2} \,\, \& \,\, \mu \ge z_{th_2}; \\ F_{Z_{r_1}}(\lambda )F_{Z_{t_1}}(z_{th_2}), &{} \lambda \ge z_{th_2} \,\, \& \,\, z_{th_1}\le \mu<z_{th_2}; \\ (1-F_{Z_{r_1}}(\lambda ))[(1-p_{s})(F_{Z_{t_1}}(z_{th_1})-F_{Z_{t_1}}(\mu )) \\ \qquad \quad +p_{s}(F_{Z_{t_2}}(z_{th_1})-F_{Z_{t_2}}(\mu ))] +F_{Z_{r_1}}(\lambda )F_{Z_{t_1}}(z_{th_2}), &{} \lambda \ge z_{th_2} \,\, \& \,\, \mu< z_{th_1}; \\ F_{Z_{t_1}}(\mu )F_{Z_{r_1}}(z_{th_2})+p_{s}(F_{Z_{r_1}}(z_{th_2})\\ \qquad \quad -F_{Z_{r_1}}(\lambda ))(F_{Z_{t_2}}(\mu )-F_{Z_{t_1}}(\mu )), &{} z_{th_1}\le \lambda< z_{th_2} \,\, \& \,\, \mu \ge z_{th_2}; \\ F_{Z_{t_1}}(\mu )(F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))+F_{Z_{r_1}}(\lambda )F_{Z_{t_1}}(z_{th_2})\\ \qquad \quad +p_{s}(F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))(F_{Z_{t_2}}(\mu )-F_{Z_{t_1}}(\mu )), &{} z_{th_1}\le \lambda< z_{th_2} \,\, \& \,\, z_{th_1}\le \mu< z_{th_2}; \\ (1-F_{Z_{r_1}}(\lambda ))[(1-p_{s})(F_{Z_{t_1}}(z_{th_1})-F_{Z_{t_1}}(\mu )) \\ \qquad \quad +p_{s}(F_{Z_{t_2}}(z_{th_1})-F_{Z_{t_2}}(\mu ))]+F_{Z_{t_1}}(\mu )\\ \qquad \quad (F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))+F_{Z_{r_1}}(\lambda )F_{Z_{t_1}}(z_{th_2})\\ \qquad \quad +p_{s}(F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))(F_{Z_{t_2}}(\mu )-F_{Z_{t_1}}(\mu )), &{} z_{th_1}\le \lambda< z_{th_2} \,\, \& \,\, \mu< z_{th_1};\\ (F_{Z_{r_1}}(z_{th_1})-F_{Z_{r_1}}(\lambda ))[(1-p_{s})\\ \qquad \quad (1-F_{Z_{t_1}}(\mu ))+p_{s}(1-F_{Z_{t_2}}(\mu ))] \\ \qquad \quad +F_{Z_{t_1}}(\mu )F_{Z_{r_1}}(z_{th_2})+p_{s}(F_{Z_{r_1}}(z_{th_2})\\ \qquad \quad -F_{Z_{r_1}}(\lambda ))(F_{Z_{t_2}}(\mu )-F_{Z_{t_1}}(\mu )), &{} \lambda< z_{th_1} \,\, \& \,\, \mu \ge z_{th_2}; \\ (F_{Z_{r_1}}(z_{th_1})-F_{Z_{r_1}}(\lambda ))[(1-p_{s})\\ \qquad \quad (1-F_{Z_{t_1}}(\mu ))+p_{s}(1-F_{Z_{t_2}}(\mu ))]+F_{Z_{t_1}}(\mu ) \\ \qquad \quad (F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))+F_{Z_{r_1}}(\lambda )F_{Z_{t_1}}(z_{th_2})\\ \qquad \quad +p_{s}(F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))(F_{Z_{t_2}}(\mu )-F_{Z_{t_1}}(\mu )), &{} \lambda< z_{th_1} \,\, \& \,\, z_{th_1}\le \mu < z_{th_2}; \\ (1-p_{s})[(1-F_{Z_{r_1}}(\lambda ))(1-F_{Z_{t_1}}(\mu ))-(1-F_{Z_{r_1}}(z_{th_1})) \\ \qquad \quad (1-F_{Z_{t_1}}(z_{th_1}))]+p_{s}[(1-F_{Z_{r_1}}(\lambda ))(1-F_{Z_{t_2}}(\mu ))\\ \qquad \quad -(1-F_{Z_{r_1}}(z_{th_1}))(1-F_{Z_{t_2}}(z_{th_1}))]+F_{Z_{t_1}}(\mu ) \\ \qquad \quad (F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))+F_{Z_{r_1}}(\lambda )F_{Z_{t_1}}(z_{th_2})\\ \qquad \quad +p_{s}(F_{Z_{r_1}}(z_{th_2})-F_{Z_{r_1}}(\lambda ))(F_{Z_{t_2}}(\mu )-F_{Z_{t_1}}(\mu )), &{} \hbox {otherwise.} \end{array} \right. \end{aligned}$$
(58)

where

$$\begin{aligned}&F_{Z_{r_1}}(z)=\sum \limits _{r=0}^{K}\left( {\begin{array}{c}K\\ r\end{array}}\right) (-1)^{r}\cdot \frac{e^{-\frac{(z-1)r}{P_{S}\gamma _{sr}}}}{\frac{zr\gamma _{se}}{\gamma _{sr}}+1}, \end{aligned}$$
(59)
$$\begin{aligned}&F_{Z_{t_1}}(z)=\left( 1-\frac{e^{-\frac{z-1}{P_{R}\gamma _{rd}}}}{1+\frac{z\gamma _{re}}{\gamma _{rd}}}\right) ^{K}, \end{aligned}$$
(60)
$$\begin{aligned}&F_{Z_{t_2}}(z)=\left( 1-\frac{e^{-\frac{z-1}{P_{R}\gamma _{rd}}}}{1+\frac{\gamma _{re}z}{\gamma _{rd}}}\right) ^{K-1}\left( 1+\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \frac{e^{-\frac{z-1}{P_{R}\gamma _{rd}}}}{1+\frac{\gamma _{re}z}{\gamma _{rd}}}\right) . \end{aligned}$$
(61)

Proof

Please see Appendix D. \(\square\)

There is always an optimal pair of \(\lambda\) and \(\mu\) that minimize the SOP. That makes sense because as \(\lambda\) and \(\mu\) increase, the requirement for the quality of the transmission link is higher, and correspondingly, the outage probability of the transmission is reduced, while the probability of choosing not to transmit due to the higher transmission requirement, which is also counted as outage, is increased. So there is a tradeoff between a reduced outage probability of the transmission and an increased outage probability of no transmission due to unmet requirements, which is also confirmed in the later simulation.

It is worth noting that the values of SOP for the proposed TBLS scheme only depend on the transmit power values, the total number of relays K, the target secrecy rate \(R_{s}\) and the channel statistics, as is shown in (58). Therefore, given these parameters, we can compute the values of SOP for the proposed TBLS scheme offline and search for the optimal pair of \(\lambda\) and \(\mu\) in advance.

5.3 A sub-optimal TBLS scheme

Considering that the search for the optimal pair of \(\lambda\) and \(\mu\) may bring extra computational complexity in implementation, we try to give the optimal values of \(\lambda\) and \(\mu\) from the perspective of theoretical analysis. It is however very tricky to find the minimum for such a complex nine-segment piecewise function whose stationary points are very hard to express. So we consider a sub-optimal TBLS (SO-TBLS) scheme, we set \(\lambda =\mu =z_{th_1}\) in the TBLS scheme proposed in the previous section.

The SOP of the proposed sub-optimal TBLS scheme is given by

$$\begin{aligned} P_{out}&=\sum \limits _{r=0}^{K}\left( {\begin{array}{c}K\\ r\end{array}}\right) (-1)^{r}\left( \frac{e^{-\frac{(z_{th_2}-1)r}{P_{S}\gamma _{sr}}}}{\frac{z_{th_2}r\gamma _{se}}{\gamma _{sr}}+1}-\frac{e^{-\frac{(z_{th_1}-1)r}{P_{S}\gamma _{sr}}}}{\frac{z_{th_1}r\gamma _{se}}{\gamma _{sr}}+1}\right) \ \nonumber \\&\quad \times \left( p_{s}\left( 1-\frac{e^{-\frac{z_{th_1}-1}{P_{R}\gamma _{rd}}}}{1+\frac{\gamma _{re}z_{th_1}}{\gamma _{rd}}}\right) ^{K-1}\left( 1+\left( {\begin{array}{c}K-1\\ K-2\end{array}}\right) \frac{e^{-\frac{z_{th_1}-1}{P_{R}\gamma _{rd}}}}{1+\frac{\gamma _{re}z_{th_1}}{\gamma _{rd}}}\right) +(1-p_{s})\right. \ \nonumber \\&\quad \left. \left( 1-\frac{e^{-\frac{z_{th_1}-1}{P_{R}\gamma _{rd}}}}{1+\frac{z_{th_1}\gamma _{re}}{\gamma _{rd}}}\right) ^{K}\right) +\left( 1-\frac{e^{-\frac{z_{th_2}-1}{P_{R}\gamma _{rd}}}}{1+\frac{z_{th_2}\gamma _{re}}{\gamma _{rd}}}\right) ^{K} \times \sum \limits _{r=0}^{K}\left( {\begin{array}{c}K\\ r\end{array}}\right) (-1)^{r}\frac{e^{-\frac{(z_{th_1}-1)r}{P_{S}\gamma _{sr}}}}{\frac{z_{th_1}r\gamma _{se}}{\gamma _{sr}}+1}, \end{aligned}$$
(62)

which can be obtained directly by the substituting \(\lambda =\mu =z_{th_1}\) into (58).

6 Results and discussion

In this section, we evaluate the proposed HyIFD scheme and TBLS scheme respectively.

6.1 The HyIFD performance

In this part, simulation results are given to verify the closed-form secrecy throughput for the proposed HyIFD scheme. We assume that \(\gamma _{sr} = \gamma _{rd} = \gamma _{se} = \gamma _{re} = 2\), unless specified otherwise.

Fig. 2
figure 2

The secrecy throughput versus \(P_{S}/P_{R}\) for different relaying protocols

Figure 2 plots the secrecy throughput versus \(P_{S}/P_{R}\) of each scheme, where the relay number is set as \(K=5\). We assume \(\mathrm{SNR}=10\) dB. We can find that the secrecy throughput always has a peak value as \(P_{S}/P_{R}\) varies, and the proposed HyIFD scheme will work in mode I for the given setting, which achieves the largest maximum secrecy throughput. It is interesting that, each scheme does not achieve the maximum secrecy throughput when \(\frac{P_{S}}{P_{R}}=1\), i.e., \(P_{S}=P_{R}\), which would be the case for throughput maximization with symmetric channel conditions [33]. This is because, the equivalent channel distributions for the two hops is not symmetric even if the channel statistics for the links are the same, which can also be seen from (7)–(10). We also note that the analytical results obtained based on the derivation in Section III match the simulation results, which verifies the approximate closed-form secrecy throughput obtained in this paper.

Fig. 3
figure 3

The maximum secrecy throughput versus SNR for different relaying protocols

In Fig. 3, we compare the maximum secrecy throughput of the proposed scheme with that of two existing max-ratio schemes as SNR varies, where the relay number is set as \(K=3\). It is clearly shown that the proposed HyIFD scheme switches between the three modes to achieve the best performance with power allocation. The approximate expression holds for a wide range of SNR values. Also, we can find that the secrecy throughput improvement diminishes in the high-SNR regime, i.e., there is a performance limit to throughput as the transmit power increases, in consistence with the closed-form expression derived in Section III-D.

Fig. 4
figure 4

The maximum secrecy throughput versus number of relays for different relaying protocols

Figure 4 plots the maximum secrecy throughput of each scheme versus the number of relays for \(\mathrm{SNR}=10\) dB. We can find that the proposed HyIFD scheme achieves the best performance in all cases. It is interesting that for a given SNR, the proposed scheme achieves the best performance at a mediate number of relays, and the max-link-ratio scheme achieves the best performance when \(K=4\). This is generally due to the tradeoff between the reduction in the power allocated to source and relays and the increased probability of choosing better channel as K increases considering the total power constraint.

Fig. 5
figure 5

The mode switch of the proposed HyIFD scheme as the SNR and relay numbers change

Figure 5 shows how the proposed HyIFD scheme switches between the three modes as the SNR and the number of relays change. We can find that mode II is more preferred in the high-SNR regime and mode III is more preferred in the low-SNR regime, i.e., the relay with the best channel quality for the first-hop is preferred in the high-SNR regime while the relay with the best channel quality in the second-hop is always favored in the low-SNR regime to achieve better throughput performance. This is because, for the high-SNR regime, the secrecy throughput depends mainly on the channel gain and the throughput is limited by the first hop considering (7)–(10), so the better throughput performance can be obtained by prioritizing the first hop. On the contrary, for the low-SNR regime, the secrecy throughput is mainly affected by the transmit power, more power ought to be allocated to the source than the transmitting relay to better utilize the total power, which means the second hop will be the bottleneck of the system, so the selection policy that be in favor of the second hop will get better throughput performance.

6.2 The TBLS performance

In this part, simulation results are given to verify the closed-form secrecy outage probability for the proposed TBLS scheme. The transmission powers are normalized to unity, i.e., \(P_{S}=P_{R}=1\). We set the average channel gains of the source-relay and relay-destination links as \(\gamma _{sr} = \gamma _{rd} =10\)dB. We set the channel gain ratio \(\alpha\) and \(\beta\) as \(\alpha =\beta =5\) and the average eavesdropping channel gains as \(\gamma _{se}=\frac{\gamma _{sr}}{\alpha }\) and \(\gamma _{re}=\frac{\gamma _{rd}}{\beta }\), unless specified otherwise.

Fig. 6
figure 6

The secrecy outage probability versus \(\lambda\) and \(\mu\) for the proposed scheme

In Fig. 6, we plot the secrecy outage probability of the proposed TBLS scheme versus \(\lambda\) and \(\mu\). We assume that the target secrecy rate \(R_{s}=1\) and the relay number is set as \(K=5\). We can find that it has different functional relationship with these two parameters in different regions, and the secrecy throughput always has a valley value as \(\lambda\) and \(\mu\) varies, i.e., we can optimize these two parameters to achieve the best secrecy outage performance, which verifies our previous analysis. We also add the contour for this figure, and we can see that the two parameters do not have exactly the same effect on the secrecy outage probability. Note that the contour goes through the point \(\lambda = \mu = 2\), which means \(\lambda = \mu = z_{th_1}\) is not the optimal choice.

Fig. 7
figure 7

The secrecy outage probability versus the target secrecy rate for different relaying protocols

In Fig. 7, we plots the secrecy outage probability for each scheme as the target secrecy rate varies, where the relay number is set as \(K=5\). We can find that the proposed scheme performs better than two existing max-ratio relay selection schemes in terms of secrecy outage probability. The theoretical and simulation results are shown to essentially perfectly match, which verifies the closed-form secrecy outage probability obtained in this paper. We can also see that the performance of SO-TBLS is very close to that of TBLS, which indicates that SO-TBLS can be a good alternative to TBLS without searching for the optimal \(\lambda\) and \(\mu\). Note that we search for \(\lambda\) and \(\mu\) within an interval with a step size of 0.2 in simulation, and we believe that if the search accuracy is improved, so is the secrecy outage performance of the proposed TBLS scheme.

Fig. 8
figure 8

The secrecy outage probability versus number of relays for different relaying protocols

Figure 8 plots the secrecy outage probability of each scheme versus the number of relays for \(R_{s}=1\). It is clearly shown that the increase in the relay number can significantly improve the secrecy outage performance and the proposed TBLS scheme achieves the best performance, which agree with the theoretical analysis. We can see that SO-TBLS performs almost as well as TBLS with the given parameters.

Fig. 9
figure 9

The secrecy outage probability versus the channel gain ratio for different relaying protocols

Figure 9 plots the secrecy outage probability of each scheme versus the channel gain ratio, which reflects the change in the intensity of the main channel. We assume \(\alpha =\beta\). The relay number is set as \(K=5\) and the target secrecy rate is set as \(R_{s}=1\). It is obvious that the secrecy outage probability decreases as the main channel becomes stronger and the proposed TBLS scheme achieves best performance.

7 Conclusion

In this paper, we studied the relay selection schemes for secure buffer-aided cooperative relay networks. We first proposed a HyIFD policy that switches between these three sub-strategies according to the different conditions to improve the secrecy throughput performance for ART transmissions. With the help of buffers at the relays, different relays for reception and transmission were selected with the largest or the second largest ratio among \(S-R\) and \(R-D\) links respectively, to simultaneously receive and transmit. Then, we proposed a hybrid HD/FD transmission scheme named TBLS protocol aiming at improving the secrecy outage performance for FRT transmissions. We introduced and optimized two selection parameters to ensure the transmission quality of both two hops. We also considered a SO-TBLS scheme as a good alternative to TBLS with lower requirements for computational complexity. We considered the RF strategy such that the eavesdropper can only independently decode the signals received in the two hops. Both the closed-form expressions for the secrecy throughput of the proposed HyIFD scheme and that for the secrecy outage probability of the proposed TBLS scheme were derived. The Numerical results in consistence with the analytical expressions demonstrated the performance superiority of the proposed schemes in secrecy throughput and secrecy outage probability compared with the benchmark schemes.