1 Introduction

Relay assisted wireless communication looks promising for long-range communication through optimal power allocation that leads to the improvement on network performance in terms of its throughput, reliability, the area of coverage, interference mitigation, outage minimization, etc. [1, 2]. Relay placement strategy is also considered to play a critical role in energy efficiency [3]. Most of the previous works focus on two relaying techniques: amplify-and-forward (AF) and decode-and-forward (DF) [4].

Relays are mostly battery powered and they may need frequent recharging or replacement of battery resources. Energy harvesting (EH) is appearing as a promising technology to support the sustainable operation of wireless networks traditionally challenged by limited battery power of the wireless devices [5]. In addition to the usage of renewable energy sources like solar energy, wind energy, ocean energy, biomass, etc., EH from radio-frequency (RF) signals is fast emerging as an attractive alternative means [6]. Using this technique, wireless devices can be repeatedly recharged to support sustainable operations of wireless networks, despite being equipped with finite battery power. However, due to the non-deterministic nature of both information and power transfer over wireless fading channel, the end-to-end reliability of the EH relay assisted communication remains an important issue of research. In this paper, our goal is to study the outage performance of RF-EH relay (EHR) assisted bidirectional communications, using an optimization framework.

2 Related works

The literature on EH via RF signal for wireless communication is quite rich [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24, 26]. There are two major directions research in RF-EH based communication networks. The first one allows both information as well as energy transmission via RF signal, which is termed as simultaneous wireless information and power transfer (SWIPT) [7]. The other method suggests the protocol of harvest-then-transmit, which is known as wireless powered communication network (WPCN) [8]. While the former one accomplishes simultaneous processing of information and energy harvesting at the receiver using the transmitted signal, the latter one avails RF-EH from the base station in downlink to energize the corresponding wireless devices for the uplink information transfer. The impact of traditional RF interference in a communication receiver equipped with RF-EH circuitry would also be highly interesting and investigated in [17,18,19]. This paper describes RF-EH using SWIPT mechanism.

The receiver architecture for SWIPT can be of three different types: power-splitting (PS), time-switching (TS) [7] and hybrid power-time switching (HPTS) [9]. In PS architecture, the receiver can separate the received energy from the RF signal into two streams. One part of the energy is fed to the EH circuit and the rest is used to process information. In TS architecture, the time frame is divided into two non-overlapping time slots, one for EH through power transfer and the other one for information transmission. The integration of time splitting and power splitting when used in a single framework, is called as HPTS.

RF-EH has a crucial role in cooperative relay network to transmit information via an EH enabled relaying node. Based on the constraint of energy causality, the usable energy of the relaying node cannot exceed the energy harvested and thus puts a limit on the system performance dictated by the end-to-end outage. Performance of various forms of cooperative wireless networks are reported in [9,10,11,12,13,14,15,16, 22,23,24, 26] to highlight the efficacy of RF-EH relay. Studies on the performances of various system parameters like ergodic capacity, outage capacity, outage probability etc. are evaluated in RF-EH based wireless networks considering the AF and DF relay aided [9,10,11,12,13,14,15,16] network models for both one-way and two-way communications.

One-way communication using AF and DF relay assisted RF-EH networks are analysed in [10,11,12,13], In [10], the performance in terms of outage probability is studied for both AF and DF relay aided networks following PSR protocol. However, the closed-form expression of throughput for DF relay aided network is derived in [11] to study the performance for both PSR and TSR protocols. The authors [11] note that PSR performed better than TSR for a wide range of SNR. Another interesting study is shown in [12] to observe the influence of co-channel interference (CCI) in RF-EH wireless network. The authors of [12] derive both outage capacity and ergodic capacity expressions to investigate the system performance for both PSR and TSR protocols. In [13], both AF and DF relay aided SWIPT enabled network performances in terms of ergodic outage probability are analysed over log-normal fading channels.

To enhance the system performance in terms of spectrum efficiency, bidirectional communications using relaying scheme is found to be more effective compared to two parallel one-way communications. Bidirectional communications using AF and DF relay aided networks are studied in [9, 14,15,16]. The expressions of outage probability and ergodic capacity are derived in [14] to study the system performance of AF relay aided PS architecture. In [15], the performance of both PSR and TSR protocols are observed for both delay limited and delay tolerant traffic. The authors [15] report that power-time splitting-based two-slot protocol outperforms the throughput performance of the power-time splitting-based three-slot protocol. In [9], the authors derive the outage expression and achievable throughput in an AF relay-aided network for both TSR and the HPTS relaying (HPTSR) protocols to compare their performance with respect to PSR protocol [14]. The dual role of CCI is also studied in DF relay aided EH network in [16].

Some works are also studied in RF-EH enabled one-way and two-way communications using various optimization frameworks considering both presence and absence of channel state information (CSI) at the transmitter. In the absence of perfect CSI, transmission power minimization problem is proposed in [20] under the chance-constraint of data transmission reliability, data transmission security and energy transmission reliability. For absence of CSI at the transmitter, the optimal policies are designed in [21] for dynamic power splitting technique. The authors [21] consider a harvesting energy constraint to enhance the ergodic capacity of the network. In [22], the authors analyze a three-phase, EH relay network in the presence of known CSI to obtain an optimal power allocation aiming to enhance the received SNR of the transceiver. In [23], a closed-form outage expression is obtained in DF relay aided bidirectional communications with PSR protocol. The outage minimization problem of [23] is solved using a complex meta-heuristic search technique, genetic algorithm (GA) instead of using classical optimization technique. The importance of relay placement in minimizing outage probability in a one-way EH relay assisted communication is addressed in [24]. This study focuses on the DF relay aided transmission using PS scheme and the optimum outage performance is studied with respect to the placement of the relay node. The result is also compared with the same architecture without energy harvesting. Apart from these, the scope of optimization for access point selection in solar-powered super Wi-Fi networks is investigated in [25].

2.1 Scope and contributions

Motivated by the impact of harvesting energy on the system outage probability [24], we analyse the performance of a DF relay aided two-way communications system. Results of preliminary investigation are already reported in [26]. Precisely, in [26], we derive a closed-form expression of system outage probability. We also evaluate the optimal values of the relay placement and harvesting time separately to achieve the minimum outage probability. In our present study, the system model is further extended in a cognitive radio based spectrum sharing framework, where the two-way communications system is assumed to use the spectrum of a licensed users.

To the best of our knowledge, the optimal outage analysis of DF relay assisted two-way communications in RF-EH is relatively less explored as compared to one-way communication. This work is an extension of [26] and contributions of the present study are as follows:

  1. 1.

    It is shown that effective outage minimization is achievable through joint optimization of relay placement and time required for EH at EHR using HPTSR protocol.

  2. 2.

    HPTSR protocol performs superior to PSR protocol [26] in EH relay assisted two-way communications by more than 55\(\%\).

  3. 3.

    A comparative study between one-way and two-way communications is carried out to show the improvement in spectrum efficiency using two-way communications over one-way communication [24].

  4. 4.

    The impact of interference from EHR due to relay broadcasting is considered in the underlay mode of a cognitive radio network (CRN) and based on that result is presented in terms of secondary outage probability with respect to primary outage constraint. It highlights that secondary outage cannot be improved with the increasing value of primary outage after reaching the optimal value.

An index of symbols and the description of those symbols are presented in Table  1 to follow the paper easily. The remainder of this paper is arranged as follows. Section 3 explains the system model and time frame structure. Section 4 shows the outage analysis for two-way relaying protocol and Sect. 5 reports a detailed performance evaluation. Finally, Sect. 6 concludes this paper.

Table 1 Symbols and definitions
Fig. 1
figure 1

a System model; b frame structure for bidirectional relaying

Fig. 2
figure 2

System model of two-way underlay cognitive radio network

3 Proposed system model and protocol description

The architecture of the system model for the research problem stated in this section. This is followed by a detailed description of the typical data transmission protocols used.

3.1 System model

3.1.1 Bidirectional communications network model

The system model, shown in Fig. 1a, allows a bidirectional communications between \({User}_1\) and \({User}_2\). It is assumed that direct links are not available between the two users because of the presence of some obstacle between them. Hence the bidirectional communications takes place via a DF relay node using half-duplex channels. It is also assumed that the relay node is equipped with necessary hardware to scavenge energy from received RF signals from both the users, following the principle of SWIPT. Distance between two users is L and EHR is located at distance of\(\xi \)L from \({User_1}\) and (1-\(\xi \))L from \({User_2}\), where \(0< \xi < 1\). The EHR and the users are mounted with a single antenna. Block fading channel model is considered, for all the wireless links present between the users and the EHR. Furthermore, fading coefficients of these channels are modeled as independent complex circular symmetric Gaussian random variables with the mean value of zero and unit variance, i.e. \(g_{1r}\sim {\mathcal {CN}}(0,1) \), \(g_{2r}\sim {\mathcal {CN}}(0,1)\), \(g_{r1}\sim {\mathcal {CN}}(0,1)\) and \(g_{2r}\sim {\mathcal {CN}}(0,1)\). The symbol \(g_{ir}\) and \(g_{ri}\) are used to represent the coefficients between the links \({User_i}\) to EHR and EHR to \({User_i}\), respectively, where i \(\in \) 1, 2. It is assumed that all the necessary channel state information (CSI) are available at \({User_1}\), \({User_2}\) and EHR.

3.1.2 Protocol description

Frame by frame transmission is considered in this relay assisted network. Detailed frame structure for bidirectional relaying is displayed in Fig. 1b. Total frame duration T is divided into three different phases: \(\tau _{1}T\), \(\tau _{2}T\), \((1-\tau _{1}-\tau _{2})T\); where \(0<\tau _{1}, \tau _{2}<1\) and \((\tau _{1}+\tau _{2})<1\). During the first transmission phase, \({User_1}\) sends its signal to EHR over the duration \({\tau _1T}\). Similarly, in the second phase, i.e. during the interval \({\tau _2T}\), \({User_2}\) transmits its signal to EHR. During \(\tau _iT\) ( i \(\in \) 1, 2), power P is extracted from RF signal received for EH and the remaining RF power is used for decoding information at EHR. In the third phase of transmission, EHR decodes and re-encodes information received from \({User_i}\) and mixes two streams of information using the principle of network coding (NC) [27]. This is followed by broadcasting of the coded information to \({User_1}\) and \({User_2}\) simultaneously. Data transmission is done between \({User}_i\) (\(i \in 1,2\)) to EHR in \(\tau _{i}T\) time interval. Now, \({User_1}\) and \({User_2}\) receive the broadcast coded information from EHR and they decode their individual messages from coded information following the standard decoding technique of NC.

Underlay cognitive radio network model: In order to enhance spectrum utilization, the system model, shown in Fig. 2, also shows an underlay cognitive radio network [28] and is an extension of the previous model shown in Fig.1a. The system model in Fig. 2. seems more general over the model in Fig.1a., the former is studied here to highlight the efficacy of the proposed harvesting power as variable interfering effect of EHR onto the primary outage constraint. The different nodes of two-way communications model are now considered as secondary \({user}_1\) (\({SU}_1\)), secondary \({user}_2\) (\({SU}_2\)) and a secondary EHR (\({SU}_R\)). The primary network includes two primary nodes—a primary transmitter (PT) and a primary receiver (PR). It is assumed that the RF spectrum necessary for communication is shared between primary and secondary network. Frame by frame transmission of information is considered over the direct link between the PT and the PR. The architecture of secondary network and the frame structure for information transmission of secondary network are same as described in 3.1.1. T is total frame duration and the primary and the secondary networks are considered to be synchronized in terms of their frame transmission [29]. The PR is assumed to experience an interference from the transmission of only EHR and not from secondary users because of the proximity of the former to the PR, compared to the latter. However, interference from PT to secondary nodes are not considered. Block fading channel model is assumed, for the direct wireless link between the primary nodes and wireless link between EHR and PR. The fading coefficients of these links are considered to be an independent complex circular symmetric Gaussian random variables with the mean value of 0 and unit variance, i.e. \(h_{1}\sim {\mathcal {CN}}(0,1)\) and \(h_{2}\sim {\mathcal {CN}}(0,1)\). The symbol \(h_{1}\) and \(h_{2}\) are used to represent the coefficients between the links PT to PR and EHR to PR.

3.2 Signal modelling

The received signal for simultaneous transmission of information and EH at EHR, from \({User_{1}}\) can be written as

$$\begin{aligned} y_{rc,1} = \dfrac{\sqrt{{P_{Tr_1}}}g_{1r}s_1}{\sqrt{(\xi L)^{\nu }}}+n_{r_1} \end{aligned}$$
(1)

where \(P_{Tr_{1}}\) denotes the transmission power of \({User_1}\); \(s_1\) is the transmit signal of \({User_1}\) with the mean value of zero and unit variance i.e. \(E{[|s_1|^2]}=1\); \(n_{r_1}\) represents the additive white gaussian noise for signal transmission from \({User_1}\) to EHR. This noise includes both antenna noise and RF to baseband conversion noise [11]. Average power of \(n_{r_1}\) is \(\sigma _{r,1}^2\). The symbol \(\nu \) indicates the path loss exponent.

Accordingly, the received signal power at EHR from \({User_1}\) is obtained as

$$\begin{aligned} P_{rc,1}=\frac{P_{Tr_{1}}|g_{1r}|^2}{(\xi L)^\nu } \end{aligned}$$
(2)

In \(\tau _1T\) duration, the power received through the signal (from \({User_1}\)) is split into two parts. As mentioned earlier, constant power P is used for EH and the rest of the received signal power, i.e. (\(P_{rc,1}-P\)) is used for decoding the messages of \(User_1\) signal at EHR.

Therefore, SNR at the EHR for information transmission from \({User_1}\) is

$$\begin{aligned} \gamma _1 =\dfrac{(P_{rc,1}-P)}{\sigma _{r,1}^{2}} \end{aligned}$$
(3)

Thus, the data rate of the link between User1 and the EHR is

$$\begin{aligned} R_{rc,1}=\dfrac{\tau _{1}T}{T}\log _{2}(1+\gamma _1) \end{aligned}$$
(4)

It may be noted that in case of deep fading, the value of \(\gamma _i \) is assuming to be 0 for \(P_{rc,i}<=P (i \in 1,2)\). Therefore, the information decoding process is not possible at EHR. Hence, \(R_{rc,i}\) falls below the target rate of data transmission.

Similarly, during \(\tau _2T\), \({User_2}\) transmits its signal to the EHR. Following the similar way in (1), the signal received for simultaneous information transmission and EH at EHR from \({User_2}\) can be written as

$$\begin{aligned} y_{rc,2} = \dfrac{\sqrt{{P_{Tr_2}}}g_{2r}s_2}{\sqrt{[(1-\xi )L]^{\nu }}}+n_{r_2} \end{aligned}$$
(5)

where \(P_{Tr_{2}}\) represents the transmit power of \({User_2}\), \(s_2\) represents the transmit signal of \({User_2}\) with the mean value of zero and unit variance i.e., \(E{[|s_2|^2]}=1\) and \(n_{r_2}\) represents the additive white gaussian noise for signal transmission from \({User_2}\) to EHR with an average power of \(\sigma _{r,2}^2\).

The received power at EHR from \({User_2}\) can be written as

$$\begin{aligned} P_{rc,2}=\frac{P_{Tr_{2}}|g_{2r}|^2}{[(1-\xi )L]^\nu } \end{aligned}$$
(6)

A constant power P is extracted for EH and the rest power (\(P_{rc,2}-P\)) from the received signal is used to decode the messages of \(User_2\). Similar to (3), SNR of the received signal used for the transmission of information from \({User_2}\) to EHR, during the transmission phase \(\tau _{2}T\), may be written as

$$\begin{aligned} \gamma _2= \dfrac{(P_{rc,2}-P)}{\sigma _{r,2}^{2}} \end{aligned}$$
(7)

Data rate at EHR from \({User_2}\) is

$$\begin{aligned} R_{rc,2}=\tau _{2}\log _{2}(1+\gamma _2) \end{aligned}$$
(8)

As shown in Fig. 1b, a constant power 2P is harvested in each frame of duration T. In the third phase of relay transmission, EHR broadcasts its encoded information to both \({User_1}\) and \({User_2}\).

Signal received at \({User_1}\) can be written as

$$\begin{aligned} y_{rs_1}=\dfrac{\sqrt{2P}g_{r1}}{\sqrt{(\xi L)^{\nu }}}w+n_{R_1} \end{aligned}$$
(9)

where w is a coded version of \(s_1\) and \(s_2\). Noise during the transmission from EHR to \({User_1}\) is \(n_{R_1}\) with average power of \(\sigma _{R_1}^{2}\).

Signal received at \({User_2}\) can be written as

$$\begin{aligned} y_{rs_2}=\dfrac{\sqrt{2P}g_{r2}}{\sqrt{[(1-\xi )L]^\nu }}w+n_{R_2} \end{aligned}$$
(10)

where the average power of \(n_{R_2}\) is \(\sigma _{R_2}^2\).

Received desired signal with the interference of EHR at PR can be expressed as

$$ \begin{aligned} y_{pr_2} = \underbrace{\dfrac{\sqrt{{P_{Tr_{pt}}}}h_{1}s_p}{\sqrt{[d_p]^{\nu }}}}_{\mathbf{Signal}} + \underbrace{\dfrac{\sqrt{2P}h_{2}s_i}{\sqrt{[d_i]^{\nu }}}}_ {\mathbf{Interference}} +\underbrace{n_{r,p}}_{\mathbf{Noise}} \end{aligned}$$
(11)

where \(P_{Tr_{pt}}\) represents transmission power of PT; symbols \(s_p\) and \(s_i\) represent transmit signal of PT and the interfering signal of EHR. The mean of both \(s_p\) and \(s_i\) are same as 0. The variances of both \(s_p\) and \(s_i\) are unity i.e. \(E{[|s_p|^2]}=1\) and \(E{[|s_i|^2]}=1\), respectively. The symbol \(n_{r,p}\) represent the channel noise on the PT-PR link.

The received data rate at \({User_1}\) can be written as

$$\begin{aligned} R_{rs_1}=(1-\tau _{1}- \tau _{2})\log _{2}\bigg (1+\dfrac{2P |g_{r1}|^2}{(\xi L)^\nu {N_1^{'}}}\bigg ) \end{aligned}$$
(12)

where \(N_1^{'}=\sigma _{R_1}^2\).

Received data rate at \({User_2}\) is described as

$$\begin{aligned} R_{rs_2}=(1- \tau _{1}- \tau _{2})\log _{2}{\bigg (1+\dfrac{2P |g_{r2}|^2}{{[(1-\xi )L]}^\nu {N_2^{'}}}\bigg )} \end{aligned}$$
(13)

where \(N_2^{'}=\sigma _{R_2}^2\).

Based on digital NC broadcast, data rate in the third phase can be written as [23]

$$\begin{aligned} R_{BC}=(1-\tau _{1}- \tau _{2})\log _{2}\big (1+SNR_{min}\big ) \end{aligned}$$
(14)

where\(SNR_{min} = min \Bigg [\dfrac{2P|g_{r1}|^{2}}{(\xi L)^\nu {N_1^{'}}}, \dfrac{2P |g_{r2}|^{2}}{[(1-\xi )L]^\nu {N_2^{'}}}\Bigg ]\)

Data rate at the PR due to direct transmission from the PT is defined as : \(R_{pr}^{ws}=\log _{2}\big (1+{\gamma _{h_1}}\big )\), where \(\gamma _{h_1} = \dfrac{{P_{Tr_{pt}} |h_{1}|^2}}{{N_p}{d_p^{\nu }}}\).

Now, the data rate at the primary receiver in presence of interference from EHR can be rewritten as

$$\begin{aligned} R_{pr}^s=\log _{2}\Bigg (1+\dfrac{\dfrac{P_{Tr_{pt}} |h_{1}|^2}{d_p^{\nu }}}{\dfrac{2P {|h_{2}|}^2}{{d_i}^{\nu }}+ {N_p}}\Bigg )=\log _{2}\Bigg (1+\dfrac{\gamma _{h_1}}{I_{h_2}+1}\Bigg ) \end{aligned}$$
(15)

where \(N_p=(\sigma _{r,p}^2)\) is additive noise power at PR; \(\gamma _{h_1}\) = \({\dfrac{P_{Tr_{pt}} |h_{1}|^2}{d_p^{\nu }{N_p}}}\); \(I_{h_2}\) = \(\dfrac{2P {|h_{2}|}^2}{{d_i}^{\nu }{N_p}}\).

\(\gamma _{h_1}\) follows an exponential distribution with its probability density function (PDF) as follows:

$$\begin{aligned} f_{\gamma _{h_1}}(v)={\dfrac{1}{ {\overline{\gamma }}_{h_1}}}{\exp }\bigg ( -{\dfrac{v}{{\overline{\gamma }}_{h_1}}}\bigg ), (v \ge 0) \end{aligned}$$
(16)

\(I_{h_2}\) also follows the exponential distribution and its PDF is given as

$$\begin{aligned} f_{I_{h_2}}(w)={\dfrac{1}{{{\overline{\mu }}}}} {\exp }\bigg (-{\dfrac{w}{{{\overline{\mu }}}}}\bigg ), (w \ge 0) \end{aligned}$$
(17)

where

$$\begin{aligned} {\overline{\gamma }}_{h_1}={{\dfrac{P_{Tr_{pt}} }{d_p^{\nu }{N_p}}}} \,and\, {{\overline{\mu }}}={\dfrac{2P }{{d_i}^{\nu }{N_p}}}. \end{aligned}$$

4 Outage analysis and optimal harvesting power calculation

4.1 Outage analysis

As shown in Fig. 1a, SWIPT-enabled two-way EH relay assisted communication network consists of three different transmission links, i.e., link between \({User_1}\) to EHR, link between \({User_2}\) to EHR and broadcast link of EHR. The outage occurs when the maximum rate of data transmission on any one of these links is less than the target rate of transmission. Specifically, it may also be considered as the complement of the event that the data transmission rate on all the said links are not in the outage, which can be mathematically expressed as follows [30]:

$$\begin{aligned}&{\small {P_{out}=1-Pr[R_{rc,1}\ge R_1 ] \times Pr[R_{rc,2}\ge R_2] \times Pr[R_{BC}\ge R_3]}}\nonumber \\&\quad {\small = 1-(1-P_{out,{s_{1}}r}) \times (1-P_{out,{s_{2}}r} ) \times (1-P_{out,BC} )} \end{aligned}$$
(18)

where \(Pr[R_{rc,i}\ge R_i]\) represents the probability of the event that the achievable data rate \(R_{rc,i}\) is greater than or equal to target rate \(R_i\) (\(\forall i \in 1,2\)). Here \(P_{out,{s_{1}}r}\), \(P_{out,{s_{2}}r}\) and \(P_{out,BC}\) represent the outage probabilities over the links between \({User_i}\) to EHR and broadcast link of EHR, respectively.

Therefore, the outage probability on \({User_1}\)-EHR link can be derived as follows [31, Sect. 5.4.1]:

$$\begin{aligned} P_{out,{s_{1}}r}=1-\exp \left[{-\dfrac{\bigg \{2^{\bigg ({\dfrac{R_1}{\tau _1}}\bigg )}-1+\dfrac{P}{\sigma _{r,1}^{2}}\bigg \}{(\xi L)}^{\nu } {\sigma _{r,1}^{2}}}{P_{Tr_1}}}\right ] \end{aligned}$$
(19)

Similarly, outage probability on \({User_2}\)-EHR link is

$$\begin{aligned} P_{out,{s_{2}}r}=1-\exp \left[{-\dfrac{\bigg \{2^ {\bigg ({\dfrac{R_2}{\tau _2}}\bigg )}-1+\dfrac{P}{\sigma _{r,2}^{2}}\bigg \}{[(1-\xi ) L]}^{\nu } {\sigma _{r,2}^{2}}}{P_{Tr_2}}}\right] \end{aligned}$$
(20)

Outage probability on EHR-\({User_1}\) link is

$$\begin{aligned} P_{out,rs_1}=1-\exp \bigg [{-\dfrac{(2^{u_{3}}-1)(\xi L)^{\nu } N_{1}^{'}}{2P}}\bigg ] \end{aligned}$$
(21)

where \(u_{3}={\dfrac{R_3}{(1-\tau _1-\tau _2)}}\)

Outage probability over EHR-\({User_2}\) link is

$$\begin{aligned} P_{out,rs_2}=1-\exp \bigg [{-\dfrac{(2^{u_{3}}-1)[(1-\xi ) L]^{\nu } N_{2}^{'}}{2P}}\bigg ] \end{aligned}$$
(22)

According to (14) and (18)

$$\begin{aligned} {Pr[R_{BC}\ge R_3]=Pr\bigg [min\bigg (\dfrac{2P |g_{r1}|^2}{{(\xi L)}^\nu {N_1^{'}}},\dfrac{2P |g_{r2}|^2}{{[(1-\xi )L]}^\nu {N_2^{'}}}\bigg ) \ge (2^{u_3}-1)\bigg ]} \end{aligned}$$
(23)

Since the channel coefficients \(g_{r1}\), \(g_{r2}\) are considered as independent, so (23) can be rewritten as follows [32, Sect. 5.2.3]:

$$\begin{aligned}&Pr[R_{BC}\ge R_3]= Pr\bigg [{\dfrac{2P |g_{r1}|^2}{{(\xi L)}^\nu {N_1^{'}}} \ge (2^{u_3}-1)}\bigg ]\nonumber \\&\quad {\times Pr\bigg [{\dfrac{2P |g_{r2}|^2}{{[(1-\xi )L]}^\nu {N_2^{'}}}\ge (2^{u_3}-1)}\bigg ]} \end{aligned}$$
(24)

Now, (18) can be modified as

$$\begin{aligned} P_{out}=1-(1-P_{out,s_{1}r})(1-P_{out,s_{2}r})(1-P_{out,rs_{1}})(1-P_{out,rs_{2}}) \end{aligned}$$
(25)

Finally, the total outage probability can be defined as

$$\begin{aligned}&P_{out}= 1-\left[\exp \left \{{-\dfrac{\bigg (2^{\bigg ({\dfrac{R_1}{\tau _1}}\bigg )} -1+\dfrac{P}{\sigma _{r,1}^{2}}\bigg ){(\xi L)}^{\nu } {\sigma _{r,1}^{2}}}{P_{Tr_1}}}\right \} \right.\nonumber \\&\quad \exp \left \{{-\dfrac{\bigg (2^{\bigg ({\dfrac{R_2}{\tau _2}}\bigg )}-1+\dfrac{P}{\sigma _{r,2}^{2}}\bigg ){\big [(1-\xi ) L\big ]}^{\nu } {\sigma _{r,2}^{2}}}{P_{Tr_2}}}\right \}\nonumber \\&\quad \exp \left\{{-\dfrac{(2^{u_{3}}-1)(\xi L)^{\nu } N_{1}^{'}}{2P}}\right \}\nonumber \\&\left. \exp \bigg \{{-\dfrac{(2^{u_{3}}-1)\big [(1-\xi ) L\big ]^{\nu } N_{2}^{'}}{2P}}\bigg \}\right] \end{aligned}$$
(26)
$$\begin{aligned}&\quad P_{out}=1-\exp \left[-\left\{ {\dfrac{\bigg (2^{\bigg ( {\dfrac{R_1}{\tau _1}}\bigg )}-1+\dfrac{P}{\sigma _{r,1}^{2}}\bigg ){(\xi L)}^{\nu } {\sigma _{r,1}^{2}}}{P_{Tr_1}}} \right.\right.\nonumber \\&\quad +{\dfrac{\left(2^{\bigg ({\dfrac{R_2}{\tau _2}}\bigg )}-1+ \dfrac{P}{\sigma _{r,2}^{2}}\right){\big [(1-\xi ) L\big ]}^ {\nu } {\sigma _{r,2}^{2}}}{P_{Tr_2}}}+\nonumber \\&\quad \left.\left.{\dfrac{(2^{u_{3}}-1)(\xi L)^{\nu } N_{1}^{'}}{2P}}+ {\dfrac{(2^{u_{3}}-1)\big [(1-\xi ) L\big ]^{\nu } N_{2}^{'}}{2P}}\right\}\right] \end{aligned}$$
(27)

Now the objective is to minimize this outage probability \(P_{out}\) with respect to the harvesting power P, which may be stated as follows:

$$\begin{aligned} \displaystyle \min _{P > 0} P_{out} \end{aligned}$$

4.2 Optimal harvesting power calculation

In the above optimization problem, minimization of the argument of the exponential function in (27) is sufficient to achieve the minimum outage probability of the system. Therefore, the problem reduces to,

P1 : \(\displaystyle \min _{P > 0}\)G where \( \begin{aligned}&G = \left \{{\dfrac{\bigg (2^{\bigg ({\dfrac{R_1}{\tau _1}}\bigg )} -1+\dfrac{P}{\sigma _{r,1}^{2}}\bigg ){(\xi L)}^{\nu } {\sigma _{r,1}^{2}}}{P_{Tr_1}}} \right. \\&\quad +{\dfrac{(2^{u_{3}}-1)(\xi L)^{\nu } N_{1}^{'}}{2P}}+{\dfrac{(2^{u_{3}}-1)\big [(1-\xi ) L\big ]^{\nu } N_{2}^{'}}{2P}}\\&\quad \left. +{\dfrac{\bigg (2^ {\bigg ({\dfrac{R_2}{\tau _2}}\bigg )}-1 +\dfrac{P}{\sigma _{r,2}^{2}}\bigg ){\big [(1-\xi ) L\big ]}^{\nu } {\sigma _{r,2}^{2}}}{P_{Tr_2}}} \right\} \end{aligned}\)

Derivative of G with respect to P is

$$\begin{aligned}&\dfrac{dG}{dP}=\Bigg [\dfrac{(\xi L)^{\nu }}{P_{Tr_{1}}}+ \dfrac{\big [(1- \xi ) L\big ]^{\nu }}{P_{Tr_{2}}}- \dfrac{2(2^{u_{3}}-1)(\xi L)^{\nu } N_{1}^{'}}{{(2P)}^{2}}\nonumber \\&\quad -\dfrac{2(2^{u_{3}}-1)\big [(1-\xi )L\big ]^{\nu } N_{2}^{'}}{{(2P)}^{2}}\Bigg ] \end{aligned}$$
(28)

Optimal solution of \( P^{*} \) is found by setting \( \dfrac{d{G}}{d{P}} \) equals to 0

$$\begin{aligned} P^{*}=\sqrt{\dfrac{(2^{u_3}-1)[(N_{1}^{'} \xi ^{\nu })+\{N_{2}^{'}(1-\xi )^{\nu }\}]}{2\bigg [\dfrac{\xi ^{\nu }}{P_{Tr_1}}+\dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]}} \end{aligned}$$
(29)

It can also be easily shown that

$$\begin{aligned} \dfrac{d^{2}G}{dP^{2}}> 0; \quad {\text{for}}\,\, \forall P > 0 \end{aligned}$$

Thus an optimal solution for the harvesting power is obtained corresponding to the minimum system outage probability.

Using (29) in (27), system outage probability is obtained as follows.

$$\begin{aligned}&P_{out}^{min}=1- \left[\exp \left\{{ -\dfrac{(u_1-1){(\xi L)}^{\nu } {\sigma _{r,1}^{2}}}{P_{Tr_1}} -\dfrac{(u_2-1){[(1-\xi ) L]}^{\nu } {\sigma _{r,2}^{2}}}{P_{Tr_2}}}\right.\right.\nonumber \\&\quad - {\sqrt{\dfrac{(2^{u_3}-1)[(N_{1}^{'} \xi ^{\nu })+\{N_{2}^{'}(1-\xi )^{\nu }\}]}{2\bigg [\dfrac{\xi ^ {\nu }}{P_{Tr_1}}+\dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]}} \bigg (\dfrac{{(\xi L)}^{\nu }}{P_{Tr_1}} +\dfrac{{[(1-\xi ) L]}^{\nu }}{P_{Tr_2}}\bigg )}\nonumber \\&\left.\left.- \quad {\dfrac{(2^{u_{3}}-1)\{(\xi L)^{\nu } N_{1}^{'} +[(1-\xi ) L]^{\nu } N_{2}^{'}\}}{2 \left(\sqrt{\dfrac{(2^{u_3}-1)\{(N_{1}^{'} \xi ^{\nu })+[N_{2}^{'}(1-\xi )^{\nu }]\}}{2\bigg [\dfrac{\xi ^{\nu }}{P_{Tr_1}}+\dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]}}\right)}}\right\}\right] \end{aligned}$$
(30)

where

$$\begin{aligned} u_1=2^{\Big ({\dfrac{R_1}{\tau _1}}\Big )} \,and\, u_2=2^{\Big ({\dfrac{R_2}{\tau _2}}\Big )} \end{aligned}$$

The optimal placement of the relay and the optimal time allocation for the various transmission phases as shown in Fig. 1b are obtained making some assumptions on: (a) time allocation factor and (b) channel noise as \(\tau _1 = \tau _2 = \tau \) and \({\sigma _{r,1}^{2}} = {\sigma _{r,2}^{2}}= {N_{1}}^{'} = {N_{2}}^{'} = N\), respectively. Then it may be written that

$$\begin{aligned}&u_1-1 = 2^{\bigg ({\dfrac{R_1}{\tau }}\bigg )}-1=u_{10}-1, u_2-1 = 2^{\bigg ({\dfrac{R_2}{\tau }}\bigg )}\\&-1= u_{20}-1 \,and\, 2^{u_3}-1 = \Bigg [{2^{\bigg ({\dfrac{R_3}{1-2\tau }}\bigg )}-1}\Bigg ] = 2^{u_{30}}-1. \end{aligned}$$

After some mathematical manipulations, (25) can be simplified as

$$\begin{aligned}&P_{out}^{min}=1-\Bigg [\exp \Bigg \{NL^{\nu }\Bigg ({-\dfrac{(u_{10}-1){\xi }^{\nu }}{P_{Tr_1}}-\dfrac{(u_{20}-1){(1-\xi )}^{\nu }}{P_{Tr_2}}\Bigg )}\nonumber \\&\quad -{\sqrt{2N}L^{\nu }\sqrt{{(2^{u_{30}}-1)\Big [ \xi ^{\nu }+(1-\xi )^{\nu }\Big ]}{\bigg [\dfrac{\xi ^ {\nu }}{P_{Tr_1}}+\dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]}}} \Bigg \}\Bigg ] \end{aligned}$$
(31)

\({P_{out}^{min}}\) can also be written as

$$\begin{aligned} {P_{out}^{min}}=1-\exp [-F] \end{aligned}$$
(32)

where

$$\begin{aligned}&F=NL^{\nu }\Bigg ({\dfrac{(u_{10}-1){\xi }^{\nu }}{P_{Tr_1}}+\dfrac{(u_{20}-1){(1-\xi )}^{\nu }}{P_{Tr_2}}\Bigg )}\\&\quad +{\sqrt{2N}L^{\nu }\sqrt{{(2^{u_{30}}-1)\Big [ \xi ^{\nu }+(1-\xi )^{\nu }\Big ]}{\bigg [\dfrac{\xi ^{\nu }}{P_{Tr_1}} +\dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]}}} \end{aligned}$$

4.3 Joint optimization of relay position and time allocation for energy harvesting

The joint optimization problem of \(\xi \) and \(\tau \), for outage minimization in Fig. 1a, can be written as minimization of (31) for \(0< \xi < 1\) and \(0< \tau <0.5\). Again, the minimization of F with respect to both \(\xi \) and \(\tau \) is equivalent to the minimization of \({P_{out}^{min}}\). Thus, the optimization problem can be rewritten as,

\(\displaystyle \min _{0< \xi< 1, 0< \tau < 0.5}\) F

The optimal solution of \(\xi \) and \(\tau \) can be found analytically by taking the partial derivatives of F in (33) and (34) with respect to \(\xi \) and \(\tau \), respectively.

$$\begin{aligned}&\dfrac{\partial {F}}{\partial {\xi }}=N \nu L^{\nu } {\Bigg (\dfrac{(u_{10}-1){\xi } ^{\nu -1}}{P_{Tr_1}}-\dfrac{(u_{20}-1){(1-\xi )}^{\nu -1}}{P_{Tr_2}}\Bigg )}\nonumber \\&\quad +\dfrac{{\sqrt{N}\nu L^{\nu } \sqrt{{(2^{u_{30}}-1)}{\bigg [\dfrac{\xi ^{\nu }}{P_{Tr_1}} +\dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]}}} \Big \{ \xi ^{\nu -1}-(1-\xi )^{\nu -1}\Big \}}{ {\sqrt{2\Big [ \xi ^{\nu }+(1-\xi )^{\nu }\Big ]}}}\nonumber \\&\quad +\dfrac{{\sqrt{N}\nu L^{\nu }\sqrt{{(2^{u_{30}}-1)\Big [ \xi ^{\nu }+(1-\xi )^{\nu }\Big ]}}} \bigg [\dfrac{\xi ^{\nu -1}}{P_{Tr_1}}-\dfrac{(1-\xi )^{\nu -1}}{P_{Tr_2}}\bigg ]}{ {\sqrt{2{\bigg [\dfrac{\xi ^{\nu }}{P_{Tr_1}} +\dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]}}}} \end{aligned}$$
(33)
$$\begin{aligned}&\quad \dfrac{\partial {F}}{\partial {\tau }}= \Bigg [NL^{\nu }\Bigg \{2^{\bigg ({{\dfrac{R_1}{\tau }}}\bigg )} \Bigg \}(\log _{e}^{2})\bigg (\dfrac{-R_{1}\xi ^{\nu }}{\tau ^2 {P_{Tr_1}}} \bigg )\nonumber \\&\quad +NL^{\nu }\Bigg \{2^{\bigg ({{\dfrac{R_2}{\tau }}} \bigg )}\Bigg \}(\log _{e}^{2})\bigg (\dfrac{-R_{2}(1-\xi ) ^{\nu }}{\tau ^2 {P_{Tr_2}}}\bigg )\nonumber \\&\quad +{\dfrac{\sqrt{2N} L^{\nu } \sqrt{\Big [ \xi ^{\nu }+(1-\xi )^{\nu }\Big ]\bigg [\dfrac{\xi ^{\nu }}{P_{Tr_1}}+ \dfrac{(1-\xi )^{\nu }}{P_{Tr_2}}\bigg ]} \Bigg \{2^{\bigg ({{\dfrac{R_3}{1-2\tau }}}\bigg )} \Bigg \}(\log _{e}^{2}){R_3} }{{(1-2\tau )^2}\sqrt{(2^{u_{30}}-1)}}}\Bigg ] \end{aligned}$$
(34)

The nature of these two first order derivatives are too non-linear. Therefore, it is found to be difficult to derive the closed-form solution of both \(\xi ^*\) and \(\tau ^*\) by equating \(\dfrac{\partial {F}}{\partial {\xi }} = 0\) and \(\dfrac{\partial {F}}{\partial {\tau }} = 0\), respectively. The optimal value of \(\xi ^*\) and \(\tau ^*\) can one-way be determined using meta-heuristic complex search technique (for example, GA, differential evolution (DE) etc.) of optimization toolbox of MATLAB by equating \(\dfrac{\partial {F}}{\partial {\xi }} = 0\) and \(\dfrac{\partial {F}}{\partial {\tau }} = 0\). The computational complexity, to determine the optimal value of relay placement and consequent time allocation strategy, using DE is \(O(K \times M)\) [33], where K is the size of design variable \(\xi \) and M is the size of design variable \(\tau \). The optimized values of \(\xi ^{*}\) and \(\tau ^{*}\) are validated through the simulation in next section.

Using the optimal values of \(\xi ^{*}\) and \(\tau ^{*}\), the determinant of Hessian matrix \(\mid H \mid \) can be shown to be non-negative.

$$\begin{aligned} \mid H \mid = \begin{bmatrix} \dfrac{\partial ^2{F}}{\partial {\xi }^2}&\dfrac{\partial ^2{F}}{\partial {\xi }\partial {\tau }}\\ \dfrac{\partial ^2{F}}{\partial {\tau }\partial {\xi }}&\dfrac{\partial ^2{F}}{\partial {\tau }^2} \end{bmatrix}>0 \end{aligned}$$

Hence, \(\mid H \mid \) is found to be a positive semi-definite matrix at (\(\xi ^*\), \(\tau ^*\)). Therefore, the global minima of outage probability \({P_{out}^{min}}\) is obtained for \(\xi =\xi ^*\) and \(\tau =\tau ^*\).

4.4 Interfering impact of EHR in the outage analysis of PU network in CRN

The PU network outage, due to direct transmission between primary transmitter and receiver, is defined as \(P_{out}^{ws}=1-Pr[R_{pr}^{ws}\ge R_p]=1-\exp \bigg (-\dfrac{u_k N_p d_{p}^{\nu }}{P_{Tr_{pt}}}\bigg )\).

The primary network outage due to the interfering impact of secondary EHR is obtained as

$$\begin{aligned}&P_{out}^{s} = 1 - Pr[R_{pr}^{s}\ge R_p] = 1-Pr\bigg [ {\dfrac{\gamma _{h_1}}{I_{h_2}+1}} \ge u_{k}\bigg ]\nonumber \\&\quad =1-\int _{u_k}^{\infty }Pr\Big [I_{h_2}\le {\dfrac{\gamma _{h_1}}{u_{k}}}-1\Big ]f_{\gamma _{h_1}}(v) dv\nonumber \\&\quad =1-\int _{u_k}^{\infty }\Bigg [{\dfrac{1}{{ {\overline{\mu }}}}}\int _{0}^{{ \Big (\dfrac{v}{u_{k}}-1\Big )}}\exp \Big (-{\dfrac{w}{{{\overline{\mu }}}}}\Big ) dw\Bigg ]f_{\gamma _{h_1}}(v) dv\nonumber \\&\quad =1+{\dfrac{1}{{\overline{\gamma }}_{h_1}}} \int _{u_k}^{\infty }\bigg [\exp \bigg (- {\dfrac{\dfrac{v}{u_{k}}-1}{{{\overline{\mu }}}}}\bigg )-1\bigg ] \exp \bigg (-{\dfrac{v}{{\overline{\gamma }}_{h_1}}}\bigg )dv\nonumber \\&\quad =1-\Bigg \{\exp \Big (-\dfrac{u_k}{{{\overline{\gamma }}}_{h_1}}\Big ) -\dfrac{\exp \bigg ({\dfrac{1}{{{\overline{\mu }}}}} \bigg )\exp \bigg ({{-u_k}\bigg [{\dfrac{1}{{ \overline{\gamma }}_{h_1}}+\dfrac{1}{u_{k}{{\overline{\mu }}}}}\bigg ]}\bigg )}{{\overline{\gamma }}_{h_1}\bigg [{\dfrac{1}{ {\overline{\gamma }}_{h_1}}+\dfrac{1}{u_k {{\overline{\mu }}}}}\bigg ]}\Bigg \}\nonumber \\&\quad =1-\exp \Big (-\dfrac{u_k}{{{\overline{\gamma }}}_{h_1}}\Big ) \Bigg \{1-\dfrac{1}{\bigg [{{1}+\dfrac{{\overline{\gamma }}_{h_1}}{u_k {{\overline{\mu }}}}}\bigg ]}\Bigg \} \end{aligned}$$
(35)

where

$$\begin{aligned} {u}_k = 2^{{{{R_p}}}}-1. \end{aligned}$$

Now, (P1) may be reformulated as P2 : \(\displaystyle \min _{P > 0}\)G

$$\begin{aligned} {\mathbf{s.t.}} , P_{out}^{s}-P_{out}^{ws} \le \varepsilon \Rightarrow P_{out}^{s} \le P_{out}^{ws} + \varepsilon \end{aligned}$$
(36)

4.5 Spectrum efficiency and energy efficiency

The expression of outage probability is also applied to obtain the spectrum-efficiency (throughput) and energy-efficiency of the proposed system. Performance of the given system is compared with a similar system of one-way [24] and two-way communications [26] using PSR protocol. These two metrics for two-way communications can be expressed as follows:

$$\begin{aligned}&\eta _{SE}\vert _{(P_{out}=P_{out}^{min})}={2 \times (1-P_{out}^{min})\times {R_{t}}\times \dfrac{(1-2\tau )T}{T}}\end{aligned}$$
(37)
$$\begin{aligned}&\eta _{EE}\vert _{(P_{out}=P_{out}^{min})}={\dfrac{\eta _{SE}}{{\text{ Transmission } \text{ power } \text{ used } } \,\, \text{by} {{\, {\text{User}}_1\, \text{and}\, {\text{User}}_2}}} } \end{aligned}$$
(38)

The performance evaluation of the given system using these parameters is also done in next section.

5 Numerical results

Based on the optimal outage analysis in the preceding section, we study the performance of the proposed system. Here, normalized transmitted signal power is treated as transmitted power to noise power ratio. The system performance is compared with a similar system for one-way communication [24]. The detail setting of parameters are given in Table 2 and MATLAB software is used to the simulation study. Figures 3, 4, 5, 6, 7 and 8 are related to the system model presented in Figs. 1a and 9 is related to the model of underlay CRN shown in Fig. 9.

Table 2 Details of system parameters
Fig. 3
figure 3

Outage probability versus harvested power (P) at relay node for constant user transmission power \(P_{Tr}\)=1 W and \(P_{Tr}\)=3 W

Fig. 4
figure 4

Simulation surface plot of outage probability versus time allocation factor (\(\tau \)) versus relay placement

Fig. 5
figure 5

Outage probability versus target rate of transmission \(R_t\)

Figure 3 depicts the performance of system outage versus harvesting power P at EHR. The analytical result is shown in (27), perfectly match the simulation results. As shown in the figure, initially the performance of outage is poor when P is very less, and the outage probability improves with rising P. It may be explained as follows: if the power assigned for a user is very less then harvesting power P is also very less. This is due to the reason of poor relaying ability of EHR, since the harvesting power is inadequate. As the harvested energy increases, the relaying ability improves, which results in a fall in the value of outage probability. When the harvested power increases to the optimum value of \({P=P^{*}=1.2}\) mW, then harvested energy at EHR is found to be adequate. Minimum Outage probability is obtained at this optimum value of harvesting energy, the value when increased further, leads to an increase in outage probability. As a result of inadequate power allocation for information decoding of the messages at EHR, both from \(User_{1}\) and \(User_{2}\), in presence of noise (high SNR), increases the outage probability of the system. About 40\(\%\) improvement of outage performance is observed at \(P_{Tr}\) = 3 W as compared with \(P_{Tr}\) = 1 W for P = -30 dB. With the increase in transmission power of the users, the outage probability in the link between \({User}_i\) to EHR decreases, following (19) and (20). This results in the improvement of outage performance at a higher transmission power of a user.

Figure 4 illustrates the simulation result of outage performance with the variation of relay placement and time allocation factor (\(\tau \)). The minimum achievable value of outage probability exactly match the analytical results. This surface plot can be described with respect to any one of these two variables assuming other as constant. As shown in the figure, the system outage probability is very high, when the relay is located closer to any one of the two users, considering \(\tau \) as constant. The reason of this nature can be interpreted as follows: initially when the relay node is placed closer to \(User_1\)/\(User_2\), the outage probability due to the transmission between link \(User_1\)/ \(User_2\) to EHR is less, but due to the longer distance outage probability between link \(User_2\)/\(User_1\) to EHR is very high. As relay is shifted towards \(User_2\) from \(User_1\) the improvement on outage performance between link \(User_2\) to EHR is more than the rate of degradation of the outage performance between the link \(User_1\) to EHR. The outage probability reaches its minimum value for an optimum position of the relay, which if shifted further towards \(User_2\), leads to an increase in the outage probability. This poor outage is observed due to the rate of degradation in outage probability of the link between \(User_1\) and EHR is more than the sluggish improvement in the outage probability of the link between \(User_2\) and EHR.

As the system outage probability of the proposed HPTSR protocol is very high for a fixed position of relay and very less/high time allocation of user transmission. It is clearly observed that with a very low value of \(\tau \), the rate of information transmission from the users and relay broadcast fail to satisfy the target rate following (4), (8) and (12,13). Thus, the system outage probability is increased. If \(\tau \) continues to increase, the outage probability starts falling and reaches its minimum value for an optimum value of \(\tau ^{*}\). If \(\tau \) increases further, time of relaying, i.e., \((1-2\tau )T\) is insufficient to satisfy the target rate. This leads to a higher outage probability following (14). Theoretical global minima of outage probability \({P_{out}^{min}} = 0.04\) is obtained for \(\xi ^{*} = 0.503\) and \(\tau ^{*} = 0.129\). The simulation result of the global optimal value of outage probability is found as 0.041 when the relay is placed at the middle and time allocation factor \(\tau ^{*}\) = 0.133.

Fig. 6
figure 6

Outage probability versus normalized transmit power

Fig. 7
figure 7

Spectrum efficiency versus normalized total transmitted signal power

Fig. 8
figure 8

Energy efficiency versus normalized total transmitted signal power

Figure 5 displays the performance of system outage with respect to the target rate (\(R_1 = R_2 = R_3 = R_t\)) of transmission. The analytical results closely match the simulation results. In this observation, it is studied that the performance of system outage is steadily deteriorating with the target rate. As the transmit power and transmission intervals of both the users are same, with the increase in target transmission rate outage probability of the individual communication link increases, as shown from (19) to (23). Hence, the outage probability of the system increases following (18). Due to more relaying time, HPTSR offers better performance than PSR scheme. About \(47\%\) improvement in outage performance is noted in HPTSR compared to the performance of PSR protocol at the target rate of \(R_t=0.9\) bps/Hz in two-way communications.

Fig. 9
figure 9

Secondary outage probability versus primary outage threshold (\(\varepsilon \))

Figure 6 depicts optimal outage performance of the given system of two-way communications using HPTSR protocol vs. the normalized transmitted signal power. The performance of HPTSR protocol is also compared with that of a similar system of one-way and bidirectional communications with PSR protocol. In this figure, analytical result exactly matches the simulation results. From this figure, it is seen that better outage performance is observed in one-way communication as compared to two-way communications using HPTSR and PSR protocol. The nature of this graphical plot can be explained as follows. Due to longer time allocation on user data transmission, energy harvesting and sufficient time slot allocation for relaying, one-way communication can perform better than two-way communications at the same normalized power. System outage using HPTSR protocol drops rapidly with the increasing value of normalized transmitted signal power in the range of 35–50 dB as compared to very slow drop of two-way communications and one-way communication using PSR protocol. About \(41\%\) and \(78\%\) more power are required to attain the outage probability 0.2 for HPTSR and PSR protocols, respectively in two-way communications compared to the one-way communication system using PSR protocol.

Figure 7 presents the comparative performance results of spectrum efficiency vs normalized transmitted signal power. It is clearly seen that as one-way communication performs better in terms of its outage performance, so it can perform better at low transmitted signal power. However, due to more relaying time in two-way communications, HPTSR and PSR protocols outperform one-way communication at high transmitted signal power. About 1.37, 0.611 and 0.4671 bps/Hz average spectrum efficiencies are observed for two-way communications using HPTSR protocol, two-way communications using PSR protocol and one-way communication using PSR protocol, respectively at high transmitted signal power.

Figure 8 exhibits the energy efficiency of given system of two-way communications using HPTSR protocol vs. the normalized transmitted signal power and a comparison is also drawn with that of a similar system of one-way and bidirectional communications with PSR protocol. As shown in the figure, initially the energy efficiency increases linearly with the increment of transmission power. The reason for this graphical characteristics can be explained as follows. As the transmit power increases till the optimal value (29 dB for one-way communication using HPTSR protocol, 35.44 dB for two-way communications using PSR protocol and 38.2 dB using one-way communication with PSR protocol), the non-linear variation of the spectrum efficiency is greater than the linear variation of signal power which leads to the increase in energy efficiency. Relaying performance is improved with the increasing power of harvested energy. Thus outage performance is gradually decreasing with the increment of transmitting power till the optimal value. Ultimately, the spectrum efficiency rises due to better outage performance and the value of energy efficiency is increased. The energy efficiency attains the maximum value at optimal signal power. As two-way communications need more energy to perform better in term of spectrum efficiency, therefore, one-way communication is more energy efficient than two-way communications. If signal power increases further beyond the optimal value, the variation of spectrum efficiency is low as compared to the variation of signal power which reduces the energy efficiency.

With reference to Fig. 2 and related system model, Fig. 9 presents the effect of PU outage constraint on secondary outage performance. The analytical results exactly match the simulation results. As seen from the figure, the increase in primary outage threshold \(\varepsilon \) reduces the secondary outage probability till the optimal value of secondary outage. Secondary outage probability reaches its minimum value for an optimum value of harvesting energy. Further, if the primary outage threshold is increased the secondary outage does not improve and remains constant. The reason for this behavior can be analysed as follows. As harvesting power increases the primary outage probability is also increased accordingly. Based on the graphical plot in Fig. 3, it is clearly seen that if the harvesting power is increased beyond the optimum value then insufficient power allocation for information decoding of the messages at EHR, both from \(User_{1}\) and \(User_{2}\), in presence of noise deteriorate the performance of secondary outage. Therefore the impact of primary outage threshold is no more effective on the improvement of secondary outage probability, after reaching the optimal value of secondary outage. About 43\(\%\) improvement on secondary outage performance is observed at \(P_{Tr_{pt}}\) = 2 W compared to \(P_{Tr_{pt}}\) = 1 W for \(\varepsilon \) = 0.01.

6 Conclusions and scope of future works

This paper presents the analysis of outage probability for bidirectional communications with the help of SWIPT enabled DF relay. An optimization problem of outage probability is solved with respect to relay placement and time allocation factor. From the simulation results, it is observed that in term of spectrum efficiency, bidirectional communications is almost three times superior to one-way communication at 70 dB normalized transmitted power. This work may be extended for some future works as follows:

  • A similar analysis of outage can also be done using AF relay network and the performance can be compared with DF relay network.

  • Outage minimization can also be done for the more realistic non-linear energy harvesting model.

  • Role of multiple antennas at the users as well as at the relay may be explored for further improvement in the system outage.