1 Introduction

Recently, energy harvesting can solve the energy scarcity problem of energy-constrained wireless communication networks, which is regarded as a promising technology. Compared with traditional energy supplies such as batteries that have limited operation time, energy harvesting technology collects energy from external nature resources such as wind, solar and vibration to significantly prolong the lifetime of battery-powered equipment. However, the harvested energy by using these energy sources is random and highly depends on some uncontrollable factors such as the weather condition, which is hard to achieve reliable communication. An effective way to overcome the above limitation is to harvest energy from radio frequency (RF) electromagnetic radiation [1, 2]. Therefore, the technology named as simultaneous wireless information and power transfer (SWIPT) was proposed in [3, 4].

Subsequently, the SWIPT technologies can be applied to cooperative networks named as wireless powered relay network, in which the EH relay node can help the information transmitted from the source to the destination. Depending on the interplay between the wireless energy transfer and the wireless information transfer, two effective relay protocols have been proposed, which are time switching (TS) relay protocol and power splitting (PS) relay protocol [5]. For TS relay protocol, relay nodes harvest energy from the RF power signal and transmit the information signal in the different phases using a switch-like structure [6], while the PS relay nodes split the received signal into information part and energy part [7, 8]. Although both EH relay protocols can provide continuous energy to relay nodes, operated in half-duplex mode causes significant loss of spectrum efficiency. Full-duplex (FD) technology is considered as a useful way to improve spectrum efficiency. With the development of SI cancellation technologies, FD relay networks have received extensive attention for its simultaneous signal transmission and reception [9,10,11]. In [12], utilizing single antenna or dual antennas for energy harvesting at the relay node was proposed in an FD EH relay network. Subsequently, the relay node was set as the multiple-input-multiple-output (MIMO) structure to improve output performance [13]. However, residual SI still has a negative effect on system performance. To make full use of the SI, a SER protocol was proposed, in which the order of energy harvesting and information transmission can be changed to achieve the SI recycling [14,15,16]. In [17], four FD EH relay protocols were proposed in two-way relay networks. The TS and static PS schemes were used as a benchmark. The new time division duplexing static PS and the FD static PS schemes make full use of SI at the relay node, while the PS factor and TS factor are fixed [17]. Furthermore, the sum-throughput optimization problem about the issue of in-band SI was formulated with respect to the TS factor [18]. Then the AF relay is extended to MIMO structure [19].

For the multiple relay system, RS is an effective method to improve system performance [20,21,22]. By using EH and FD technology in some actual cooperative scenarios, the RS schemes need to be redesigned. For the PS half-duplex relay network and TS half-duplex relay network, the relay selection and power allocation algorithms were proposed [23, 24]. In [25], optimal offline and suboptimal online schemes were proposed by jointing RS and power allocation. When the channel state information is imperfect, the optimization of the maximum two-way information rate is proposed in [26]. To further improve the information rate and spectral efficiency, RS methods were utilized in FD D2D and cognitive networks [27, 28], but the considered networks were one-way relay networks. Then RS in two-way FD networks were investigated [29]. However, all relay nodes in [27,28,29] were power-constrained without EH. Combining FD technology and PS technology in two-way relay networks, minimum outage probability and maximum sum rate RS strategy were proposed in [30, 31]. However, the RS problem based on TS relay protocol in FD two-way relay networks still needs to be studied.

In this paper, two RS schemes for two-way EH FD relay networks are proposed. For the first TS FD relay protocol, we design RS schemes and obtain optimal value of TS factor to minimize outage probability and maximize the sum rate. Then the SER relay protocol for two-way networks is proposed to reuse the SI, which can be realized by adjusting the transmission order of information and energy. Moreover, two RS schemes based on the minimum outage probability and the maximum sum rate are applied to this SER relay protocol. Simulation results are provided to evaluate the improvement of the output performance by the proposed two RS schemes.

The rest of this paper is organized as follows. In Second 2 the system model of two-way FD relay networks is built. The TS FD relay protocol and the SER relay protocol are described in Sect. 3. The proposed TS factor optimization scheme and two RS schemes are proposed in Sect. 4. Simulation results are discussed to evaluate the performance of the proposed RS schemes in Sect. 5. Finally, Sect. 6 concludes this paper.

2 System model

As shown in Fig. 1a, a two-way FD relay network is considered, in which two sources can exchange their information through one EH relay from the relay set. All the involved nodes, including a relay set containing \(N\) candidate relay nodes and two source nodes \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\), are equipped with two isolated antennas to realize the FD operation. Each relay node adopts amplify-and-forward (AF) method to relay the processed signals. Due to deep fading, there is no direct link between \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\). The channel coefficients from \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\) to the selected relay node \({\text{R}}_{i}\) can be expressed as \(h_{i}\) and \(g_{i}\). And all channels that follow block Rayleigh fading and remain invariant in one block but vary independently within different time blocks. In addition, since we also assume that all channel state information can be obtained by \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\), the RS process can be made at source nodes then the decision is broadcast to all relay nodes. Figure 1b depicts the architecture of the EH relay node. It is assumed that the power of the relay nodes only derived from energy transmission.

Fig. 1
figure 1

Two-way FD energy harvesting relay networks. a system diagram, b relay node diagram

3 Two full-duplex relay protocol

In this section, two FD EH relay protocols for a two-way relay network are shown in Fig. 2. The TS FD relay protocol can realize the EH and FD information transmission as depicted in Fig. 2a. In order to eliminate the complex SI operation and recycle the SI at relay nodes, the two-way SER relay protocol is shown in Fig. 2b.

Fig. 2
figure 2

The two protocols for FD energy harvesting and information transmission. a TS relay protocol, b SER relay protocol

3.1 Time switching full-duplex relay protocol

Figure 2a shows the main parameters for EH and information transmission of the TS FD protocol. Let \(T\) donates the whole block time of the communication period in which the information signal can exchange from one source to another. From Fig. 2a, the parameter \(\alpha \left( {0 < \alpha < 1} \right)\) represents the TS factor which divides \(T\) into two parts. In the first phase of \(\alpha T\), the relay nodes harvest energy from the RF power signals transmitted by \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\). Then the remaining \(\left( {1 - \alpha } \right)T\) is used for FD information transmission. Thus, the received energy signal at the selected relay node \({\text{R}}_{i}\) is given by

$$y_{{{\text{R}}_{i} }}^{\text{E}} \left( t \right) = \sqrt {P_{\text{S}} } h_{i} s_{1i} \left( t \right) + \sqrt {P_{\text{S}} } g_{i} s_{2i} \left( t \right) + n_{{{\text{R}}_{i} }} \left( t \right)$$
(1)

where \(P_{\text{S}}\) donates the transmission power of two source nodes \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\); \(s_{1i} \left( t \right)\) and \(s_{2i} \left( t \right)\) are the transmitted signals from \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\) with unit variance; \(n_{{{\text{R}}_{i} }} \left( t \right)\) is the additive white Gaussian noise (AWGN) at the selected relay node \({\text{R}}_{i}\), whose distribution follows \(CN\left( {0,\sigma_{{{\text{R}}_{i} }}^{2} } \right)\). Ignoring the part of the energy from the noise \(n_{{{\text{R}}_{i} }} \left( t \right)\) [15], the harvested energy at \({\text{R}}_{i}\) can be given by

$$E_{{{\text{R}}_{i} }} = \eta \alpha T\left( {P_{\text{S}} \left| {h_{i} } \right|^{2} + P_{\text{S}} \left| {g_{i} } \right|^{2} } \right)$$
(2)

where \(\eta \in \left[ {0,1} \right]\) is the energy conversion efficiency. The transmission power of the selected relay node \({\text{R}}_{i}\) can be calculated as

$$P_{{{\text{R}}_{i} }} = \frac{{\eta P_{\text{S}} \left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)\alpha T}}{{\left( {1 - \alpha } \right)T}} = \frac{{\eta P_{\text{S}} \left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)\alpha }}{{\left( {1 - \alpha } \right)}}$$
(3)

The selected FD relay node assists the whole information transmission in the remaining \(\left( {1 - \alpha } \right)T\), in which the multiple-access phase and the broadcast phase can complete in the same phase. According to radio frequency, analog and digital cancellation scheme, the SI at the selected relay node and two source nodes can be effectively canceled. The received information signal in the second phase at \({\text{R}}_{i}\) can be expressed as

$$y_{{{\text{R}}_{i} }}^{\text{I}} \left( t \right) = \sqrt {P_{\text{S}} } h_{i} s_{1i} \left( t \right) + \sqrt {P_{\text{S}} } g_{i} s_{2i} \left( t \right) + f_{{{\text{R}}_{i} {\text{R}}_{i} }} V\left( t \right) + n_{{{\text{R}}_{i} }} \left( t \right)$$
(4)

where \(f_{{{\text{R}}_{i} {\text{R}}_{i} }}\) donates the residual SI channel at \({\text{R}}_{i}\) due to imperfect cancellation, and the amplified signal is

$$V\left( t \right) = \sqrt {P_{{{\text{R}}_{i} }} } \beta_{\text{T}} y_{{{\text{R}}_{i} }}^{\text{I}} \left( {t - 1} \right)$$
(5)

where \(\beta_{\text{T}}\) is the normalized amplify factor at the relay nodes. According to the expression (4), \(\beta_{\text{T}}\) can be expressed as

$$\beta_{\text{T}} = \frac{1}{{\sqrt {P_{\text{S}} \left| {h_{i} } \right|^{2} + P_{\text{S}} \left| {g_{i} } \right|^{2} + P_{{{\text{R}}_{i} }} \left| {f_{{{\text{R}}_{i} {\text{R}}_{i} }} } \right|^{2} + \sigma_{{{\text{R}}_{i} }}^{2} } }}$$
(6)

Thus, the received signal at \({\text{S}}_{ 1}\) can be expressed as

$$y_{{{\text{S}}_{1} }} \left( t \right) = h_{i} V\left( t \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{ 1} {\text{S}}_{ 1} }} s_{1i} \left( t \right) + n_{{{\text{S}}_{1} }} \left( t \right)$$
(7a)
$${ = }\sqrt {P_{{{\text{R}}_{i} }} P_{\text{S}} } \beta_{\text{T}} \left( {h_{i}^{2} s_{1i} \left( {t - 1} \right) + h_{i} g_{i} s_{2i} \left( {t - 1} \right)} \right)$$
(7b)
$$\quad+ \;h_{i} \beta_{\text{T}} \sqrt {P_{{{\text{R}}_{i} }} } f_{{{\text{R}}_{i} {\text{R}}_{i} }} V\left( {t - 1} \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{1} {\text{S}}_{ 1} }} s_{1i} \left( t \right)$$
(7c)
$$\quad { + }h_{i} \beta_{\text{T}} \sqrt {P_{{{\text{R}}_{i} }} } n_{{{\text{R}}_{i} }} \left( {t - 1} \right) + n_{{{\text{S}}_{1} }} \left( t \right)$$
(7d)

and the received signal at \({\text{S}}_{ 2}\) can be expressed as

$$y_{{{\text{S}}_{ 2} }} \left( t \right) = g_{i} V\left( t \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{ 2} {\text{S}}_{ 2} }} s_{2i} \left( t \right) + n_{{{\text{S}}_{2} }} \left( t \right)$$
(8a)
$${ = }\sqrt {P_{{{\text{R}}_{i} }} P_{\text{S}} } \beta_{\text{T}} \left( {g_{i}^{2} s_{2i} \left( {t - 1} \right) + h_{i} g_{i} s_{1i} \left( {t - 1} \right)} \right)$$
(8b)
$$\quad + \;g_{i} \beta_{\text{T}} \sqrt {P_{{{\text{R}}_{i} }} } f_{{{\text{R}}_{i} {\text{R}}_{i} }} V\left( {t - 1} \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{2} {\text{S}}_{2} }} s_{2i} \left( t \right)$$
(8c)
$$\quad { + }\;{\text{g}}_{i} \beta_{\text{T}} \sqrt {P_{{{\text{R}}_{i} }} } n_{{{\text{R}}_{i} }} \left( {t - 1} \right) + n_{{{\text{S}}_{ 2} }} \left( t \right)$$
(8d)

where \(f_{{{\text{S}}_{ 1} {\text{S}}_{ 1} }}\) and \(f_{{{\text{S}}_{ 2} {\text{S}}_{ 2} }}\) donate the residual SI channel at two source nodes \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\), respectively; two terms \(\sqrt {P_{{R_{i} }} } \beta_{\text{T}} h_{i}^{2} s_{1i} \left( {t - 1} \right)\) and \(\sqrt {P_{{{\text{R}}_{i} }} } \beta_{\text{T}} g_{i}^{2} s_{1i} \left( {t - 1} \right)\) can be totally canceled due to network coding [30]. The second term of (7b) and (8b) are the desired signal of \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\). The first and second terms of (7c) and (8c) donate the residual SI of \({\text{S}}_{ 1}\), \({\text{S}}_{ 2}\) and \({\text{R}}_{i}\). In high SNR region and substituting the Eq. (3), (5) and (6) into (7) and (8), the instantaneous signal-to-interference-plus-noise-ratio (SINR) at \({\text{S}}_{ 1}\) can be calculated as [17]

$$\begin{aligned} {\text{SINR}}_{{{\text{S}}_{ 1} }} & = \frac{{\phi \varphi \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} \left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)}}{{\left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)\phi \varphi \left| {h_{i} } \right|^{2} + \left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)\varphi + 1}} \\ \, & \approx \frac{{\phi \varphi \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\phi \left| {h_{i} } \right|^{2} + 1}} \\ \end{aligned}$$
(9)

and the instantaneous SINR at \({\text{S}}_{ 2}\) can be calculated as

$$\begin{aligned} {\text{SINR}}_{{{\text{S}}_{ 2} }} & = \frac{{\phi \varphi \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} \left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)}}{{\left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)\phi \varphi \left| {g_{i} } \right|^{2} + \left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)\varphi + 1}} \\ \, & \approx \frac{{\phi \varphi \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\phi \left| {g_{i} } \right|^{2} + 1}} \\ \end{aligned}$$
(10)

where the parameters \(\phi\) and \(\varphi\) can be written as

$$\phi = \frac{\eta \alpha }{{\left( {1 - \alpha } \right)}}$$
(11)
$$\varphi = \frac{{P_{\text{S}} }}{{\sigma_{{{\text{R}}_{i} {\text{R}}_{i} }}^{2} + 1}} = \frac{{P_{\text{S}} }}{{\sigma_{{{\text{S}}_{ 1} {\text{S}}_{1} }}^{2} + 1}} = \frac{{P_{\text{S}} }}{{\sigma_{{{\text{S}}_{ 2} {\text{S}}_{2} }}^{2} + 1}}$$
(12)

For convenience, we model \(f_{{{\text{S}}_{ 1} {\text{S}}_{ 1} }}\), \(f_{{{\text{S}}_{ 2} {\text{S}}_{ 2} }}\) and \(f_{{{\text{R}}_{i} {\text{R}}_{i} }}\) as AWGN with variance of \(\sigma_{{{\text{R}}_{i} {\text{R}}_{i} }}^{2}\), \(\sigma_{{{\text{S}}_{1} {\text{S}}_{1} }}^{2}\) and \(\sigma_{{{\text{S}}_{ 2} {\text{S}}_{2} }}^{2}\), respectively. Due to all nodes operated in FD mode during the second phase, the instantaneous rate of the links between two source nodes can be expressed as

$$\begin{aligned} C_{{{\text{S}}_{ 1} }} & = \left( {1 - \alpha } \right)\log_{2} \left( {1 + {\text{SINR}}_{{{\text{S}}_{1} }} } \right) \\ & { = }\left( {1 - \alpha } \right)\log_{2} \left( {1 + \frac{{\phi \varphi \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\phi \left| {h_{i} } \right|^{2} + 1}}} \right) \\ \end{aligned}$$
(13)
$$\begin{aligned} C_{{{\text{S}}_{2} }} & = \left( {1 - \alpha } \right)\log_{2} \left( {1 + {\text{SINR}}_{{{\text{S}}_{2} }} } \right) \\ & = \left( {1 - \alpha } \right)\log_{2} \left( {1 + \frac{{\phi \varphi \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\phi \left| {g_{i} } \right|^{2} + 1}}} \right) \\ \end{aligned}$$
(14)

3.2 Self-energy recycling relay protocol

Although we use existing SI cancellation technology to eliminate SI in the TS FD relay protocol, the remaining SI still has a great impact on system performance. Therefore, we propose the SER relay protocol to reuse the SI signal at the relay nodes. As shown in Fig. 2b, the entire transmission process is divided into two equal time phases \(T/2\). The relay node receives the information transmitted from two source nodes during the first time phase. Then the relay node receives the energy from two sources and transmits the amplified signal to two sources during the remaining duration \(T/2\). Thus, the received information signal at relay node can be given by

$$y_{{{\text{R}}_{i} }}^{\text{I}} \left( t \right) = \sqrt {P_{\text{S}} } h_{i} s_{1i} \left( t \right) + \sqrt {P_{\text{S}} } g_{i} s_{2i} \left( t \right) + n_{{{\text{R}}_{i} }} \left( t \right)$$
(15)

In the second phase, the received energy signal can be given by

$$\begin{aligned} y_{{{\text{R}}_{i} }}^{\text{E}} \left( t \right) & = \sqrt {P_{\text{S}} } h_{i} s_{1i} \left( t \right) + \sqrt {P_{\text{S}} } g_{i} s_{2i} \left( t \right) \\ & \quad + f_{{{\text{R}}_{i} {\text{R}}_{i} }} V\left( {t - 1} \right) + n_{{{\text{R}}_{i} }} \left( t \right) \\ \end{aligned}$$
(16)

where \(V\left( t \right) = \sqrt {P_{{{\text{R}}_{i} }} } \beta_{\text{T}} y_{{{\text{R}}_{i} }}^{\text{I}} \left( {t - 1} \right)\). After normalizing the Eq. (15), the amplification factor \(\beta_{\text{S}}\) can be calculated as

$$\beta_{\text{S}} = \sqrt {\frac{1}{{P_{\text{S}} \left| {h_{i} } \right|^{2} + P_{\text{S}} \left| {g_{i} } \right|^{2} + \sigma_{{{\text{R}}_{i} }}^{2} }}}$$
(17)

Substituting (15) and (17) into (16), the total energy harvested by the relay node can be obtained as

$$E_{{{\text{R}}_{i} }} = \eta \frac{T}{2}P_{\text{S}} \left( {1 + P_{{{\text{R}}_{i} }} \beta_{\text{S}}^{2} \left| {f_{{{\text{R}}_{i} {\text{R}}_{i} }} } \right|^{2} } \right)\left( {\left| {h_{i} } \right|^{2} + \left| {g_{i} } \right|^{2} } \right)$$
(18)

According to the Eq. (18), the transmit power of the selected relay node can be given by

$$P_{{{\text{R}}_{i} }} = \frac{{E_{{{\text{R}}_{i} }} }}{T/2} \approx \frac{{\eta \left( {P_{\text{S}} \left| {h_{i} } \right|^{2} + P_{\text{S}} \left| {g_{i} } \right|^{2} } \right)}}{{1 - \eta \left| {f_{{{\text{R}}_{i} {\text{R}}_{i} }} } \right|^{2} }}$$
(19)

After amplifying the signal transmitted in the first phase, the received signal at the source \({\text{S}}_{ 1}\) is given by

$$y_{{{\text{S}}_{1} }} \left( t \right) = h_{i} V\left( t \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{1} {\text{S}}_{ 1} }} s_{1i} \left( t \right) + n_{{{\text{S}}_{1} }} \left( t \right)$$
(20a)
$$= \sqrt {P_{{{\text{R}}_{i} }} P_{\text{S}} } \beta_{\text{S}} \left( {h_{i}^{2} s_{1i} \left( {t - 1} \right) + h_{i} g_{i} s_{2i} \left( {t - 1} \right)} \right)$$
(20b)
$$+ \sqrt {P_{{{\text{R}}_{i} }} } \beta_{\text{S}} h_{i} n_{{{\text{R}}_{i} }} \left( {t - 1} \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{ 1} {\text{S}}_{ 1} }} s_{1i} \left( t \right) + n_{{{\text{S}}_{1} }} \left( t \right)$$
(20c)

and the received signal at the source \({\text{S}}_{ 2}\) is

$$y_{{{\text{S}}_{2} }} \left( t \right) = g_{i} V\left( t \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{ 2} {\text{S}}_{2} }} s_{2i} \left( t \right) + n_{{{\text{S}}_{ 2} }} \left( t \right)$$
(21a)
$$= \sqrt {P_{{{\text{R}}_{i} }} P_{\text{S}} } \beta_{\text{S}} \left( {g_{i}^{2} s_{2i} \left( {t - 1} \right) + h_{i} g_{i} s_{1i} \left( {t - 1} \right)} \right)$$
(21b)
$$\quad + \sqrt {P_{{{\text{R}}_{i} }} } \beta_{\text{S}} g_{i} n_{{{\text{R}}_{i} }} \left( {t - 1} \right) + \sqrt {P_{\text{S}} } f_{{{\text{S}}_{ 2} {\text{S}}_{ 2} }} s_{2i} \left( t \right) + n_{{{\text{S}}_{2} }} \left( t \right)$$
(21c)

where \(\sqrt {P_{{{\text{R}}_{i} }} P_{\text{S}} } \beta_{\text{S}} h_{i}^{2} s_{1i} \left( {t - 1} \right)\) and \(\sqrt {P_{{{\text{R}}_{i} }} P_{\text{S}} } \beta_{\text{S}} g_{i}^{2} s_{2i} \left( {t - 1} \right)\) can be totally canceled due to network coding [30]. Substituting the Eqs. (17) and (19) into (20) and (21), we can drive the instantaneous SINR at \({\text{S}}_{ 1}\) and \({\text{S}}_{ 2}\)

$${\text{SINR}}_{{{\text{S}}_{ 1} }} = \frac{{\eta P_{\text{S}} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\eta \left| {h_{i} } \right|^{2} + \left( {1 - \eta \sigma_{{{\text{R}}_{i} {\text{R}}_{i} }}^{2} } \right)\left( {P_{\text{S}} \sigma_{{{\text{S}}_{1} {\text{S}}_{1} }}^{2} + \sigma_{{{\text{S}}_{1} }}^{2} } \right)}}$$
(22)

and

$${\text{SINR}}_{{{\text{S}}_{ 2} }} = \frac{{\eta P_{\text{S}} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\eta \left| {g_{i} } \right|^{2} + \left( {1 - \eta \sigma_{{{\text{R}}_{i} {\text{R}}_{i} }}^{2} } \right)\left( {P_{\text{S}} \sigma_{{{\text{S}}_{2} {\text{S}}_{2} }}^{2} + \sigma_{{{\text{S}}_{2} }}^{2} } \right)}}$$
(23)

Therefore, the instantaneous rate of two links between two source nodes can be expressed as

$$\begin{aligned} C_{{{\text{S}}_{ 1} }} & = \frac{1}{2}\log_{2} \left( {1 + {\text{SINR}}_{{{\text{S}}_{ 1} }} } \right) \\ & = \frac{1}{2}\log_{2} \left( {1 + \frac{{\eta P_{\text{S}} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\eta \left| {h_{i} } \right|^{2} + \left( {1 - \eta \sigma_{{{\text{R}}_{i} {\text{R}}_{i} }}^{2} } \right)\left( {P_{S} \sigma_{{{\text{S}}_{1} {\text{S}}_{1} }}^{2} + \sigma_{{{\text{S}}_{1} }}^{2} } \right)}}} \right) \\ \end{aligned}$$
(24)
$$\begin{aligned} C_{{{\text{S}}_{ 2} }} & = \frac{1}{2}\log_{2} \left( {1 + {\text{SINR}}_{{{\text{S}}_{ 2} }} } \right) \\ & = \frac{1}{2}\log_{2} \left( {1 + \frac{{\eta P_{\text{S}} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\eta \left| {g_{i} } \right|^{2} + \left( {1 - \eta \sigma_{{{\text{R}}_{i} {\text{R}}_{i} }}^{2} } \right)\left( {P_{\text{S}} \sigma_{{{\text{S}}_{ 2} {\text{S}}_{ 2} }}^{2} + \sigma_{{{\text{S}}_{ 2} }}^{2} } \right)}}} \right) \\ \end{aligned}$$
(25)

where the parameter \(\frac{1}{2}\) in the Eqs. (24) and (25) is because of that the information signals are transmitted during the whole transmission time.

4 Relay selection schemes

For the multi-relay communication networks, one optimal relay can be selected to assist the transmission to improve the system performance. Without loss of generality, we assume that only one selected relay can switch from the dormant mode to active mode and harvest energy from two source nodes, while other relay nodes keep dormant. In this section, two RS schemes for two-way relay network based on the outage probability and the sum rate are proposed. According to [20, 30], the outage occurs of the two-way relay networks when one of \(C_{{{\text{S}}_{ 1} }}\) and \(C_{{{\text{S}}_{2} }}\) is smaller than the target rate \(C_{\text{th}}\), which can be expressed as

$$\begin{aligned} P_{\text{out}} & = \Pr \left( {C_{{{\text{S}}_{ 1} }} < C_{\text{th}} orC_{{{\text{S}}_{ 2} }} < C_{\text{th}} } \right) \\ & = \Pr \left( {\hbox{min} \left( {C_{{{\text{S}}_{ 1} }} ,C_{{{\text{S}}_{ 2} }} } \right) < C_{\text{th}} } \right) \\ \end{aligned}$$
(26)

where \(C_{\text{th}}\) is the outage threshold.

The sum rate is defined as the sum of two communication links, which can be expressed as

$$C_{\text{Sum}} = C_{{{\text{S}}_{ 1} }} + C_{{{\text{S}}_{ 2} }}$$
(27)

4.1 Time switching full-duplex relay protocol

For the TS FD relay protocol, the relay selection problem can be formulated as

$$\begin{aligned} & \mathop {\hbox{min} }\limits_{{{\text{R}}_{i} ,\alpha }} J\left( {R,\alpha } \right) \\ & {\text{s}} . {\text{t}} . { }\alpha \in \left[ {0,1} \right], \, i \in 1,2, \ldots ,N \\ \end{aligned}$$
(28)

where \(J\left( {{\text{R}},\alpha } \right)\) is the objective function with respect to the TS factor \(\alpha\) and the set of relay nodes \({\text{R}}\).

We can note that the optimal TS factor and the optimal relay node \({\text{R}}_{i}\) of the Eqs. (13) and (14) can minimize the outage probability. In order to realize this RS scheme, minimizing the outage probability is equivalent to maximize the minimum rate of two links. Thus, the optimization problem can be converted into

$$\alpha_{i}^{*} = \arg \mathop {\hbox{max} }\limits_{1 \ge \alpha \ge 0} \hbox{min} \left( {C_{{{\text{S}}_{1} }} ,C_{{{\text{S}}_{2} }} } \right)$$
(29)

Proposition 1

The objective function \(\hbox{min} \left( {C_{{{\text{S}}_{1} }} ,C_{{{\text{S}}_{2} }} } \right)\) is strictly concave with regard to the TS factor over the interval \(\left[ {0,1} \right]\).

Proof

For simplicity, let \(C_{{{\text{S}}_{j} }} \left( \alpha \right)\) donates \(C_{{{\text{S}}_{ 1} }}\) and \(C_{{{\text{S}}_{ 2} }}\), where \(j \in \left( {0,1} \right)\). We can obtain the first-order derivative of \(C_{{{\text{S}}_{j} }} \left( \alpha \right)\) with respect to \(\alpha\), which can be calculated as

$$\begin{aligned} \frac{{dC_{{{\text{S}}_{j} }} \left( \alpha \right)}}{d\alpha } & = - \log_{2} \left( {1 + \frac{A\alpha }{B\alpha + 1 - \alpha }} \right) \\ & \quad + \frac{{\left( {1 - \alpha } \right)A}}{{\ln 2\left( {A\alpha + B\alpha + 1 - \alpha } \right)\left( {B\alpha + 1 - \alpha } \right)}} \\ \end{aligned}$$
(30)

where \(A = \eta P_{\text{S}} /\left( {\sigma_{{{\text{S}}_{j} {\text{S}}_{j} }}^{2} + 1} \right)\) and \(B = \eta \left| {h_{i} } \right|^{2}\).

Then calculating the second-order derivative of \(C_{{{\text{S}}_{j} }} \left( \alpha \right)\) with respect to \(\alpha\), we can obtain

$$\begin{aligned} \frac{{dC_{{S_{j} }}^{2} \left( \alpha \right)}}{{d^{2} \alpha }} & = - \frac{A}{\ln 2}\frac{{\left( {1 - \alpha } \right) + B\left( {1 + \alpha } \right)}}{{\left( {A\alpha + B\alpha + 1 - \alpha } \right)\left( {B\alpha + 1 - \alpha } \right)^{2} }} \\ & \quad - \frac{A}{\ln 2}\frac{{\left( {1 - \alpha } \right)\left( {A + B - 1} \right)\left( {B\alpha + 1 - \alpha } \right)}}{{\left( {\left( {A\alpha + B\alpha + 1 - \alpha } \right)\left( {B\alpha + 1 - \alpha } \right)} \right)^{2} }} \\ \end{aligned}$$
(31)

Obviously, the objective function with respect to \(\alpha\) is a strictly concave function since \(A \gg B\), \(A \gg 1\) and \(dC_{{{\text{S}}_{j} }}^{2} \left( \alpha \right)/d^{2} \alpha < 0\). In addition, the first-order derivative of \(C_{{{\text{S}}_{j} }} \left( \alpha \right)\) is positive when \(\alpha = 0\), while \(dC_{{{\text{S}}_{j} }} \left( \alpha \right)/d\alpha < 0\) when \(\alpha\) approaches 1. Thus, there is an optimal TS factor \(\alpha^{*} \in \left[ {0,1} \right]\), which can maximize the instantaneous rate. Based on the above analysis, a time allocation scheme based on the binary search method was proposed. The optimal TS factor \(\alpha^{*}\) can be found by searching for the point where the first derivative is equal to zero. And Proposition 1 is proved.

Time allocation scheme

1) Initialize \(\alpha_{\text{a}} = 0\), \(\alpha_{\text{b}} = 1\) and the maximum tolerance \(\varepsilon\) (a small positive real number close to 0);

2) While \(\left| {\alpha_{\text{a}} - \alpha_{\text{b}} } \right| \ge \varepsilon\)

3) Based on the Eq. (26) and (29), calculate \(\xi = dC_{{{\text{S}}_{j} }} \left( \alpha \right)/d\alpha\) where \(\omega = \left( {\alpha_{\text{a}} - \alpha_{\text{b}} } \right)/2\);

4) If \(\xi = 0\), \(\alpha^{*} = \omega\) and go to end;

5) Else if \(\xi > 0\), set \(\alpha_{\text{a}} = \left( {\alpha_{\text{a}} + \alpha_{\text{b}} } \right)/2\);

6) Else if \(\xi < 0\), set \(\alpha_{\text{b}} = \left( {\alpha_{\text{a}} + \alpha_{\text{b}} } \right)/2\);

7) End if

8) End while

9) \(\alpha^{*} = \left( {\alpha_{\text{a}} - \alpha_{\text{b}} } \right)/2\) is the optimal TS factor.

We also optimize the TS factor to maximizing the sum rate in both directions. Hence, the optimization function is formulated as

$$\alpha_{i}^{*} = \arg \mathop {\hbox{max} }\limits_{1 \ge \alpha \ge 0} \left( {C_{{{\text{S}}_{ 1} }} + C_{{{\text{S}}_{ 2} }} } \right)$$
(32)

According to the convex optimization knowledge, the addition of two concave functions is still a concave function. To obtain the optimal TS factor that maximizes the sum rate, the objective function (29) in the above time allocation scheme can be changed to (32). Then the optimal solution \(\alpha^{*}\) can be obtained via the proposed time allocation scheme.

After optimizing the TS factor of different objective functions, the minimum outage probability and the maximum sum rate RS scheme can be divided into two steps. First, we can obtain the optimal TS factor that maximizes the minimum instantaneous rate or maximizes the sum rate. Then the optimal relay can be selected from the candidate relay set, which can achieve the maximum worse instantaneous rate or the maximum sum rate. The RS problem based on minimum outage probability can be formulated as

$$i_{\text{TSOP}}^{ *} = \arg \mathop {\hbox{max} }\limits_{{i \in \left[ {1,2, \ldots ,N} \right]}} \mathop {\hbox{max} }\limits_{{\alpha \in \left[ {0,1} \right]}} \hbox{min} \left( {C_{{{\text{S}}_{1} }} ,C_{{{\text{S}}_{ 2} }} } \right)$$
(33)

Similarly, the objective function of the RS scheme that achieves the maximum sum rate can be written as

$$i_{\text{TSSR}}^{ *} = \arg \mathop {\hbox{max} }\limits_{{i \in \left[ {1,2, \ldots ,N} \right]}} \mathop {\hbox{max} }\limits_{{\alpha \in \left[ {0,1} \right]}} \left( {C_{{{\text{S}}_{ 1} }} + C_{{{\text{S}}_{ 2} }} } \right)$$
(34)

4.2 Self-energy recycling relay protocol

For the SER relay protocol, we also present two RS schemes. However, the TS factor is fixed to 1/2 because the whole transmission process is equally divided. According to the Eqs. (2426), we can obtain the solution of RS problem, in which we first select the smaller SINR of the two links and then select the relay node with the largest SINR. Thus, the RS scheme based on minimum outage probability can be expressed as

$$i_{\text{SROP}}^{ *} = \arg \mathop {\hbox{max} }\limits_{{i \in \left[ {1,2, \ldots ,N} \right]}} \hbox{min} \left( {{\text{SINR}}_{{{\text{S}}_{ 1} }} ,SINR_{{{\text{S}}_{ 2} }} } \right)$$
(35)

Similarly, the RS scheme to achieve the maximum sum rate under the SER relay protocol can be formulated as

$$i_{\text{SRSR}}^{ *} = \arg \mathop {\hbox{max} }\limits_{{i \in \left[ {1,2, \ldots ,N} \right]}} \left( {C_{{{\text{S}}_{ 1} }} + C_{{{\text{S}}_{ 2} }} } \right)$$
(36)

5 Simulation and results

In this section, simulation results are provided to evaluate the output performance of the proposed RS scheme based on two relay protocols. For simplify but without loss of generality, we assume the noise variances \(\sigma_{{{\text{R}}_{\text{i}} }}^{ 2}\), \(\sigma_{{{\text{S}}_{ 1} }}^{ 2}\) and \(\sigma_{{{\text{S}}_{ 2} }}^{ 2}\) equal to 1. By using existing SI cancellation techniques, the SI can suppress the interference by \(70\;{\text{dB}}\) or more [30]. For the TS FD protocol, the residual SI at all nodes is set to \(\sigma_{{{\rm{R}}_{\rm{i}} {\rm{R}}_{\rm{i}} }}^{ 2} = \sigma_{{{\rm{S}}_{ 1} {\rm{S}}_{ 1} }}^{ 2} = \sigma_{{{\rm{S}}_{ 2} {\rm{S}}_{ 2} }}^{ 2} = - 75\;{\rm{dB}}\) due to the same SI cancellation technology. However, for SER relay protocol, the SI cancellation is canceled at the selected relay node. Therefore, the residual SI at the selected relay node is set to \(\sigma_{{{\rm{R}}_{\rm{i}} {\rm{R}}_{\rm{i}} }}^{ 2} = - 5\;{\rm{dB}}\).

To demonstrate the superiority of our proposed RS scheme with TS FD protocol, the proposed RS scheme and the other three RS schemes are compared in Fig. 3. It is assumed that there are 20 relay nodes in the candidate set. We set the energy conversion efficiency factor as \(\eta = 0.6\). Scheme 1 is the proposed RS scheme with the TS FD relay protocol. Scheme 2 has the optimal TS factor and random RS. Scheme 3 is the maximum channel gain RS scheme, and the fixed TS factor is set to \(\alpha_{\text{F}} = 0.5\). The last scheme 4 is the traditional random RS scheme. As shown in Fig. 3, the performance gains of the proposed RS scheme has the best sum rate. Scheme 1 and scheme 2 have the same trend due to the optimization of TS factor. However, the sum rate of scheme 2 is lower than that of scheme 3 from 0 to 24 dB, which shows the advantage of the optimal RS strategy. And the sum rate of the proposed scheme can achieve \(1 0. 5\;{\text{bps/Hz}}\) when \({\text{SNR}} = 3 0\;{\text{dB}}\).

Fig. 3
figure 3

Sum rate of the four schemes with TS relay protocol versus SNR

The effect of the variance of the \({\text{SNR}}\) on the sum rate performance with different energy conversion efficiency factors is illustrated in Fig. 4. And we compare the TS FD relay protocol and SER relay protocol with different energy conversion efficiency \(\eta\). As shown in Fig. 4, the TS FD scheme has better performance than the SER scheme when \({\text{SNR}} \le 10\;{\text{dB}}\) and \(\eta = 1\), while the SER scheme has better performance than the TS FD scheme when \(10\;{\text{dB}} \le {\text{SNR}} \le 30\;{\text{dB}}\). The maximum achievable sum rate of SER scheme can achieve \(1 1. 3\;{\text{bps/Hz}}\) when \(\eta = 1\) and \({\text{SNR}} = 30\;{\text{dB}}\). With the same parameters, the maximum achievable sum rate of TS FD scheme can achieve \(8. 5 0 6\;{\text{bps/Hz}}\). Whether it is TS FD scheme or SER scheme, the achievable sum rate of the considered network increases as the improvement of the energy conversion efficiency. It can be clearly seen that the energy conversion factor has a great impact on the system sum rate.

Fig. 4
figure 4

Sum rate of the three schemes with SER relay protocol versus SNR

Figure 5 investigates the sum rate versus residual SI channel gain. In addition, we compare the proposed RS scheme with TS FD relay protocol and the optimal TS factor and random RS scheme. From Fig. 5, the effect of the value of \(\sigma_{{{\rm{R}}_{\rm{i}} {\rm{R}}_{\rm{i}} }}^{ 2}\), \(\sigma_{{{\text{S}}_{ 1} {\text{S}}_{ 1} }}^{ 2}\) and \(\sigma_{{{\text{S}}_{ 2} {\text{S}}_{ 2} }}^{ 2}\) on the sum rate performance is trivial when it is relatively low. However, a serious effect has appeared when the value of residual SI channel gain is larger than \(- 10\;{\text{dB}}\). A comparison of the sum rate for different value of \(P\) is also given in Fig. 5, where \(P\) donates the total transmission power. It shows that increasing the power \(P\) can improve the sum rate.

Fig. 5
figure 5

Sum rate with varying residual self-interference channel gain

The sum rate versus the number of the available relay in the candidate set is depicted in Fig. 6. We observe a significant increase in the sum rate with the number of relay increases. For instance, the sum rate of the TS FD-based RS scheme with \(P = 30\;{\text{dB}}\) is about \(8. 5 4 4\;{\text{bps/Hz}}\) when \(N = 1\), and the sum rate is about \(9. 8 3 4\;{\text{bps/Hz}}\) when \(N = 20\). Furthermore, for the SER-based RS scheme with \(P = 30\;{\text{dB}}\), the sum rate will increase by \(1\;{\text{bps/Hz}}\). In addition, the sum rate with two relay protocol is decreased as \(P\) decreases from 30 to 20 dB.

Fig. 6
figure 6

Sum rate with different number of relays

In Fig. 7, we compare the proposed RS schemes with half-duplex EH schemes and RS scheme without EH. For the TS-based and the PS-based half-duplex schemes, all nodes are worked in half-duplex mode. Therefore, the sum rate of two links in the TS-based half-duplex scheme can be expressed as

$$C_{{{\text{S}}_{ 1} }} + C_{{{\text{S}}_{ 2} }} = \frac{{\left( {1 - \alpha } \right)}}{2}\log_{2} \left( {1 + {\text{SNR}}_{{{\text{S}}_{ 1} }}^{\text{HDTS}} } \right)\left( {1 + {\text{SNR}}_{{{\text{S}}_{ 2} }}^{\text{HDTS}} } \right)$$
(37)

where

$${\text{SNR}}_{{{\text{S}}_{ 1} }}^{\text{HDTS}} = \frac{{2\eta \alpha P_{S} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{2\eta \alpha \left| {h_{i} } \right|^{2} \sigma^{2} + \left( {1 - \alpha } \right)\sigma_{{}}^{2} }}$$
(38)
$${\text{SNR}}_{{{\text{S}}_{ 2} }}^{\text{HDTS}} = \frac{{2\eta \alpha P_{S} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{2\eta \alpha \left| {g_{i} } \right|^{2} \sigma^{2} + \left( {1 - \alpha } \right)\sigma_{{}}^{2} }}$$
(39)
Fig. 7
figure 7

The comparison of the half-duplex EH schemes, the RS scheme without EH and the proposed schemes

And the sum rate of two links in PS-based half-duplex scheme can be expressed

$$C_{{{\text{S}}_{ 1} }} + C_{{{\text{S}}_{ 2} }} = \frac{1}{2}\log_{2} \left( {1 + {\text{SNR}}_{{{\text{S}}_{ 1} }}^{\text{HDPS}} } \right)\left( {1 + {\text{SNR}}_{{{\text{S}}_{ 2} }}^{\text{HDPS}} } \right)$$
(40)

where

$${\text{SNR}}_{{{\text{S}}_{ 1} }}^{\text{HDPS}} = \frac{{\eta \rho \left( {1 - \rho } \right)P_{S} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\eta \rho \left( {1 - \rho } \right)\left| {h_{i} } \right|^{2} \sigma^{2} + \eta \rho \left| {h_{i} } \right|^{2} \sigma^{2} + \left( {1 - \rho } \right)\sigma^{2} }}$$
(41)
$${\text{SNR}}_{{{\text{S}}_{ 2} }}^{\text{HDPS}} = \frac{{\eta \rho \left( {1 - \rho } \right)P_{S} \left| {h_{i} } \right|^{2} \left| {g_{i} } \right|^{2} }}{{\eta \rho \left( {1 - \rho } \right)\left| {g_{i} } \right|^{2} \sigma^{2} + \eta \rho \left| {g_{i} } \right|^{2} \sigma^{2} + \left( {1 - \rho } \right)\sigma^{2} }}$$
(42)

The TS-based half-duplex scheme has the optimal RS and the fix TS factor \(\alpha = 0. 3\). The PS-based half-duplex scheme has the optimal RS and the fix PS factor \(\rho = 0. 3\). In addition, the two-way FD RS scheme same as [29]. From Fig. 7, it is obvious that the sum rate of the proposed scheme is higher than the TS-based half-duplex scheme and the PS-based half-duplex scheme from 0 dB to 30 dB. The RS scheme without EH has the best performance when \({\text{SNR}} \ge 18\;{\text{dB}}\). However, the proposed RS schemes have a similar sum rate to the RS scheme without EH, while the proposed RS scheme can prolong the lifetime of the considered networks. We note that the sum rate of the proposed RS scheme with TS FD can achieve \(9. 0 5 8\;{\text{bps/Hz}}\) when \({\text{SNR}} = 25\;{\text{dB}}\) and the proposed RS scheme with SER can achieve \(7. 1 4 9\;{\text{bps/Hz}}\) while the sum rate of the TS-based half-duplex scheme and PS-based half-duplex scheme can only reach \(5. 3 6 4\;{\text{bps/Hz}}\) and \(5. 4 9 5\;{\text{bps/Hz}}\).

Figure 8 displays the outage probability of the proposed RS scheme with TS FD relay protocol and the other three RS scheme under various \({\text{SNR}}\). The outage threshold of the instantaneous rate is set to \(C_{\text{th}} = 3.0\;{\text{bps/Hz}}\). It is observed that the performance of the proposed TS FD RS schemes outperforms that of the other three RS schemes, which reflects the impact of TS factor on system performance improvement. As can be seen, with the \({\text{SNR}}\) varying from 25 to 30 dB, the outage probability of the proposed scheme drops approximately from \(1. 9 7 5\times 1 0^{ - 2}\) to \(2. 6 6 7\times 1 0^{ - 3}\), while the outage probability of the maximum channel gain RS scheme drops approximately from \(8. 3 1 7\times 1 0^{ - 2}\) to \(1.458 \times 1 0^{ - 2}\).

Fig. 8
figure 8

The outage probability of two schemes with TS relay protocol versus SNR

The comparison of the proposed RS scheme with the SER relay protocol, the TS-based half-duplex scheme and the PS-based half-duplex scheme are illustrated in Fig. 9. Since the SI at the relay node can be reused, the information signal can be forwarded by the bigger power of the relay node. The outage probability of the proposed SER RS scheme can reach \(1 0^{ - 2}\) when \({\text{SNR}} = 30\;{\text{dB}}\). It can be seen that the outage probability of our proposed scheme is lower than the TS-based half-duplex scheme and the PS-based half-duplex scheme (Fig. 9).

Fig. 9
figure 9

The outage probability of three schemes with SER relay protocol versus SNR

6 Conclusion

In this work, two RS schemes based on energy harvesting technologies in two-way FD relay networks are proposed, which can improve the spectrum efficiency of the considered networks and provide continuous energy to energy-constrained relay nodes. For the TS FD protocol, we prove that the strictly concave with respect to the TS factor at high SNR and propose a time allocation scheme based on the binary search method. In addition, two single RS schemes based on the optimized TS factor are proposed to achieve the minimum outage probability and maximum sum rate. Subsequently, a novel SER two-way relay protocol is proposed to reuse the SI, which can further prolong the lifetime of the considered system. Then two RS schemes that minimize outage probability and maximize sum rate are also applied to the SER protocol. Simulation results show that the two-way FD energy harvesting relay networks have better output performance than two-way half-duplex relay networks. Besides, two RS schemes and the proposed SER relay protocol can achieve better output performance compared with traditional schemes.